Language Trees via Compression
- 49Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What was the main achievement demonstrated by the Language Trees and Zipping approach?
What was the main achievement demonstrated by the Language Trees and Zipping approach?
49 questions
- 1
What was the main achievement demonstrated by the Language Trees and Zipping approach?
- A
It translated documents between languages using a manually constructed linguistic dictionary
- B
It generated fluent text in each language using a large neural language model
- C
It identified grammatical rules by consulting experts in historical linguistics
- D
It clustered documents by language and recovered relationships among languages using compression
Correct answer
DIt clustered documents by language and recovered relationships among languages using compression
Explanation
The approach used general-purpose file compression to cluster texts by language and recover a tree representing shared language lineage, without pre-baked linguistic knowledge.
- A
- 2
How does the basic document-comparison procedure estimate the difference between documents A and B?
- A
It translates both documents into a common language and compares their vocabularies
- B
It compresses each document separately and compares the alphabetical order of their output bytes
- C
It appends a snippet of B to A and compares the combined compressed size with the compressed size of A alone
- D
It counts the number of words in A and subtracts the number of words in B
Correct answer
CIt appends a snippet of B to A and compares the combined compressed size with the compressed size of A alone
Explanation
The method appends a small piece of B to A, compresses the result, and compares that size with the size obtained by compressing A alone.
- A
- 3
Why should a snippet from B compress relatively well when appended to A?
- A
The compressor automatically translates B into the language used by A
- B
The snippet from B contains fewer characters than every snippet from A
- C
The compressor gives every appended snippet the same number of output bits
- D
The linguistic patterns in B are similar to patterns the compressor learned from A
Correct answer
DThe linguistic patterns in B are similar to patterns the compressor learned from A
Explanation
A compressor optimized for A can encode a snippet from B efficiently when B shares similar statistical or linguistic patterns with A.
- A
- 4
What does a larger increase in compressed size after appending B to A generally indicate?
- A
The compressor has achieved perfect compression on both documents
- B
B has patterns that are more different from those in A
- C
B has exactly the same statistical structure as A
- D
A contains fewer symbols than B regardless of their patterns
Correct answer
BB has patterns that are more different from those in A
Explanation
If B is more unlike A, a compressor optimized for A will use more space to encode the appended material from B.
- A
- 5
Why can gzip provide a useful language-distance measure despite not being a perfect compressor?
- A
It contains a complete database of language family trees
- B
Its output is always equal to the Shannon-optimal number of bits
- C
It uses a separate optimized probability model for every natural language
- D
Its imperfect estimate of cross-entropy can still reflect differences in repetition and statistical patterns
Correct answer
DIts imperfect estimate of cross-entropy can still reflect differences in repetition and statistical patterns
Explanation
Gzip does not reach the Shannon limit, but its handling of repeated sequences can still approximate differences in the patterns of two texts well enough to produce useful comparisons.
- A
- 6
Which additional natural-language task was described as being approachable with the same compression-based idea?
- A
Identifying the author of a document
- B
Determining the physical location of the document's printer
- C
Converting every sentence into a formal logical proof
- D
Measuring the font size used in the original document
Correct answer
AIdentifying the author of a document
Explanation
The same general compression comparison can help identify authorship because different authors may produce distinguishable patterns in text.
- A
- 7
What is the central question shared by cross-entropy and compression-based document comparison?
- A
How quickly can a model translate one setting into another?
- B
How many distinct symbols occur in the two settings?
- C
How well does a coding scheme optimized for one setting perform in another setting?
- D
How many documents were used to define the original coding scheme?
Correct answer
CHow well does a coding scheme optimized for one setting perform in another setting?
Explanation
Both ideas evaluate the performance of a representation or code learned from one distribution when it is applied to data from another distribution.
- A
- 8
Why is the gzip comparison only analogous to, rather than exactly equal to, cross-entropy?
- A
It compares probability distributions but never uses any actual text
- B
It uses text samples and an imperfect compressor rather than explicitly comparing ideal probability distributions
- C
It requires a modern neural language model to estimate every symbol probability
- D
It measures document length only and ignores all statistical patterns
Correct answer
BIt uses text samples and an imperfect compressor rather than explicitly comparing ideal probability distributions
Explanation
The document is treated as a sample from a distribution, and gzip provides an imperfect empirical compression estimate rather than an exact probability-based calculation.
- A
- 9
In the robot-instruction example, what probabilities describe the original distribution?
- A
Left has probability one-half, right has probability one-fourth, and up and down each have probability one-eighth
- B
Up and down each have probability one-half, while left and right have probability zero
- C
Up has probability one-half, down has probability one-fourth, and left and right each have probability one-eighth
- D
All four instructions have probability one-fourth
Correct answer
CUp has probability one-half, down has probability one-fourth, and left and right each have probability one-eighth
Explanation
The original distribution assigns one-half to up, one-fourth to down, and one-eighth to each of left and right.
- A
- 10
Under the original robot distribution, what code lengths are assigned by the optimal encoding?
- A
Up uses three bits, down uses two bits, and left and right use one bit each
- B
Every instruction uses two bits because there are four possible instructions
- C
Up uses one bit and every other instruction uses two bits
- D
Up uses one bit, down uses two bits, and left and right use three bits each
Correct answer
DUp uses one bit, down uses two bits, and left and right use three bits each
Explanation
The optimal code assigns shorter codes to more probable symbols: one bit for up, two for down, and three for each of left and right.
- A
- 11
For an optimal code, how is the information content of a symbol with probability p expressed using base-two logarithms?
- A
−log2p
- B
−plog2p
- C
log2p
- D
plog2p
Correct answer
A−log2p
Explanation
The information content of an event is its negative base-two logarithm, −log2p. Less probable events therefore require more information to specify.
- A
- 12
What does Shannon's information content measure?
- A
The number of files stored by a compression program
- B
The total number of symbols available in a coding alphabet
- C
The physical distance between two communicating devices
- D
How surprising or informative the occurrence of an event is
Correct answer
DHow surprising or informative the occurrence of an event is
Explanation
Information content measures the amount of information associated with an event, increasing as the event becomes less probable.
- A
- 13
How is the information content of a complete message related to the information content of its symbols?
- A
It is found by multiplying the information contents of all symbols together
- B
It is represented by the sum of the information contents of the individual symbols
- C
It is unrelated to the information contents of the symbols once encoding begins
- D
It is always equal to the information content of the most probable symbol
Correct answer
BIt is represented by the sum of the information contents of the individual symbols
Explanation
The information content of a full message is the sum of the information contents of its individual symbols, and an optimal encoding uses approximately that many bits.
- A
- 14
Why can optimal information values be fractional even though individual bits are discrete?
- A
They occur only when a compressor fails to recognize repeated sequences
- B
They indicate that a bit can physically be divided into two smaller electrical signals
- C
They represent average bits per symbol across many messages rather than necessarily a fixed integer code length for one symbol
- D
They result from using an incorrect probability distribution for every symbol
Correct answer
CThey represent average bits per symbol across many messages rather than necessarily a fixed integer code length for one symbol
Explanation
Information values such as −log2p need not be integers, but fractional values have a meaningful interpretation as average bits per symbol over many encoded messages.
- A
- 15
What probabilities describe the changed robot distribution?
- A
Up has probability one-half, down has probability one-fourth, and left and right each have probability one-eighth
- B
All four instructions have probability one-fourth
- C
Up and right each have probability one-half, while down and left have probability zero
- D
Up and down each have probability one-eighth, left has probability one-fourth, and right has probability one-half
Correct answer
DUp and down each have probability one-eighth, left has probability one-fourth, and right has probability one-half
Explanation
The changed distribution assigns one-eighth to up and down, one-fourth to left, and one-half to right.
- A
- 16
What is the average number of bits per instruction when the old code is used with the changed robot distribution?
- A
3.500 bits
- B
1.000 bit
- C
2.000 bits
- D
2.625 bits
Correct answer
D2.625 bits
Explanation
The old code uses one bit for up, two for down, and three for left and right. Weighting these lengths by the new probabilities gives 81(1)+81(2)+41(3)+21(3)=2.625 bits.
- A
- 17
If Q is the distribution used to optimize an encoding and P is the distribution encountered in practice, which expression represents cross-entropy?
- A
∑iPi(−log2Pi)
- B
∑iQi(−log2Qi)
- C
∑iQi(−log2Pi)
- D
∑iPi(−log2Qi)
Correct answer
D∑iPi(−log2Qi)
Explanation
Cross-entropy uses the actual or new-distribution weights Pi and the code lengths determined by Qi, giving ∑iPi(−log2Qi).
- A
- 18
In a bar visualization of cross-entropy, what do the width and height of bar i represent?
- A
The width is Qi, and the height is −log2Qi
- B
The width is Qi, and the height is −log2Pi
- C
The width is Pi, and the height is −log2Pi
- D
The width is Pi, and the height is −log2Qi
Correct answer
DThe width is Pi, and the height is −log2Qi
Explanation
The cross-entropy sum weights the code length −log2Qi by the actual probability Pi, so the bar width is Pi and its height is −log2Qi.
- A
- 19
When Q is uniform over two events and P assigns probabilities 0.9 and 0.1, what is the cross-entropy?
- A
Exactly two bits
- B
One bit
- C
About 1.74 bits
- D
Less than one-half bit
Correct answer
BOne bit
Explanation
Because Q assigns one-half to each event, both events have information content of one bit under Q. Therefore, any weighting by P still gives a cross-entropy of one bit.
- A
- 20
When Q assigns probabilities 0.9 and 0.1 but P is uniform, what is the approximate cross-entropy?
- A
About 1.74 bits
- B
Less than one-half bit
- C
Exactly one bit
- D
Exactly three bits
Correct answer
AAbout 1.74 bits
Explanation
The uniform P distribution frequently encounters the event that Q considers rare, so the average code length is approximately 1.74 bits.
- A
- 21
What does the order of P and Q signify in cross-entropy?
- A
The order has no effect because cross-entropy is symmetric
- B
P determines the encoding, while Q determines how often the encoded events occur
- C
Both distributions always play identical roles in the formula
- D
Q determines the encoding, while P determines how often the encoded events occur
Correct answer
DQ determines the encoding, while P determines how often the encoded events occur
Explanation
The code is optimized for Q, which determines the heights −log2Qi, while P supplies the frequencies used to average those code lengths.
- A
- 22
For fixed P, when does cross-entropy attain its minimum as Q varies?
- A
When Q is identical to P
- B
When Q assigns zero probability to rare events
- C
When Q is the reverse ordering of P
- D
When Q is uniform regardless of the shape of P
Correct answer
AWhen Q is identical to P
Explanation
Cross-entropy is minimized when the encoding distribution Q matches the actual distribution P.
- A
- 23
What is the minimum possible value of cross-entropy for a fixed distribution P?
- A
The entropy of P
- B
The largest information content under Q
- C
The entropy of Q regardless of its value
- D
The number of possible symbols
Correct answer
AThe entropy of P
Explanation
When Q=P, cross-entropy reaches its minimum, and that minimum equals the entropy of P.
- A
- 24
What does a language model produce when given a sequence of input tokens?
- A
A compressed file containing only the input tokens
- B
A probability distribution over possible next tokens
- C
A probability distribution over document authors only
- D
A single guaranteed next token with no uncertainty
Correct answer
BA probability distribution over possible next tokens
Explanation
A language model maps an input sequence of tokens to a probability distribution over all possible tokens that could follow.
- A
- 25
What are tokens in modern language models typically described as?
- A
Compressed files produced after model training
- B
Numerical labels assigned exclusively to document authors
- C
Only complete paragraphs separated by blank lines
- D
Words or pieces of words into which text is divided
Correct answer
DWords or pieces of words into which text is divided
Explanation
Language models generally process text as sequences of tokens, which are often complete words or subword pieces.
- A
- 26
What is the purpose of a loss function during language-model training?
- A
It quantifies how well or poorly the model's predictions match the training data
- B
It permanently fixes every model parameter before optimization begins
- C
It converts all training documents into a single language
- D
It determines the vocabulary before any text is processed
Correct answer
AIt quantifies how well or poorly the model's predictions match the training data
Explanation
The loss function assigns a numerical measure to prediction quality, allowing optimization to adjust the model toward better performance.
- A
- 27
How is the per-token loss computed in ordinary language-model pre-training?
- A
It is the difference between the lengths of the input and output sequences
- B
It is the number of alternative tokens that the model could have produced
- C
It is the positive logarithm of the probability assigned to the most likely token
- D
It is the negative logarithm of the probability assigned to the actual next token
Correct answer
DIt is the negative logarithm of the probability assigned to the actual next token
Explanation
For each training position, the model is penalized by the negative log of the probability it assigns to the true next token.
- A
- 28
Why does the negative-log loss punish very confident incorrect predictions especially strongly?
- A
The negative logarithm grows steeply when the assigned probability approaches zero
- B
The loss is largest when the model assigns probability one to the true token
- C
The loss ignores the probability of the true token and counts only vocabulary size
- D
The negative logarithm becomes zero whenever the assigned probability is small
Correct answer
AThe negative logarithm grows steeply when the assigned probability approaches zero
Explanation
If the model assigns a very low probability to the true token, its negative logarithm is large, producing a strong penalty.
- A
- 29
Why do machine-learning systems usually use natural logarithms rather than base-two logarithms?
- A
Natural logarithms eliminate the need for gradient descent and backpropagation
- B
Base-two logarithms cannot be used for fractional information values
- C
Natural logarithms are the only logarithms that can represent probabilities
- D
Natural logarithms make derivatives cleaner, while the base changes the loss only by a constant factor
Correct answer
DNatural logarithms make derivatives cleaner, while the base changes the loss only by a constant factor
Explanation
Changing the logarithm base introduces only a constant scaling factor, while natural logarithms simplify differentiation used by gradient-based optimization.
- A
- 30
What optimization methods adjust language-model parameters to reduce the loss?
- A
Compression and decompression without parameter updates
- B
Random guessing and manual dictionary lookup
- C
Gradient descent and backpropagation
- D
Translation and alphabetical sorting
Correct answer
CGradient descent and backpropagation
Explanation
Gradient descent uses loss gradients to choose parameter updates, and backpropagation computes those gradients through the network.
- A
- 31
Why is ordinary next-token loss described as a special case of cross-entropy?
- A
The training data contains only one token in total
- B
The target distribution places all probability mass on the one true next token
- C
The loss compares two uniform distributions at every position
- D
The model assigns equal probability to every possible next token
Correct answer
BThe target distribution places all probability mass on the one true next token
Explanation
The target distribution is fully concentrated on the observed next token. All other target probabilities are zero, leaving only the negative log of the model's probability for that token.
- A
- 32
Why does minimizing cross-entropy encourage a model's output distribution to match the data distribution?
- A
Cross-entropy ignores the frequencies of outcomes in the training data
- B
Cross-entropy reaches its minimum precisely when the model distribution equals the distribution represented in the data
- C
Cross-entropy rewards the model for assigning all probability to rare events
- D
Cross-entropy is minimized when the model distribution is as different from the data as possible
Correct answer
BCross-entropy reaches its minimum precisely when the model distribution equals the distribution represented in the data
Explanation
The defining minimum property of cross-entropy is achieved when the predicted distribution matches the actual distribution.
- A
- 33
Why is the negative logarithm effectively forced as the loss function if matching data statistics is required?
- A
The constrained optimization argument requires a derivative proportional to the reciprocal of probability, a property of logarithms
- B
Only a negative logarithm can produce a probability distribution over tokens
- C
The logarithm is selected solely because compressed files use logarithmic filenames
- D
A logarithm is required because neural networks cannot process linear functions
Correct answer
AThe constrained optimization argument requires a derivative proportional to the reciprocal of probability, a property of logarithms
Explanation
Under the constraint that predicted probabilities sum to one, the condition for the desired minimum leads to a derivative proportional to 1/q, whose integral is logarithmic.
- A
- 34
What quantity does the full pre-training loss average across the training corpus?
- A
The number of parameters used by the model for each document
- B
The compression ratio of each file independent of token probabilities
- C
The probability assigned only to the model's most likely token
- D
The negative log probability assigned to each observed token
Correct answer
DThe negative log probability assigned to each observed token
Explanation
Pre-training averages the information, measured by negative log probability, of every observed token across the entire training dataset.
- A
- 35
What is the goal of model distillation?
- A
To train a large model using only randomly generated tokens
- B
To increase the size of a model until it can memorize the entire training set
- C
To replace a language model with a file-compression utility
- D
To train a smaller model to approximate the behavior of a larger model
Correct answer
DTo train a smaller model to approximate the behavior of a larger model
Explanation
Distillation transfers useful behavior from a larger teacher model to a smaller student model that is cheaper and more efficient to run.
- A
- 36
How does the loss in distillation differ from ordinary next-token pre-training?
- A
It compares the small model only with the length of the training document
- B
It compares the small model's full output distribution with the large model's full output distribution
- C
It compares two input documents without considering any next-token predictions
- D
It ignores the model's predicted distribution and uses only the most common token
Correct answer
BIt compares the small model's full output distribution with the large model's full output distribution
Explanation
Distillation uses the teacher's entire probability distribution as the target rather than using only the one token observed in the data.
- A
- 37
Why can distillation provide richer supervision than ordinary pre-training?
- A
The teacher forces every possible next token to have exactly the same probability
- B
The teacher communicates how plausible many possible next tokens are, not just which token happened to occur
- C
The student receives no probability information and must infer all patterns independently
- D
The training example is removed so the student cannot learn from any context
Correct answer
BThe teacher communicates how plausible many possible next tokens are, not just which token happened to occur
Explanation
A teacher model supplies a graded distribution over alternatives, giving the student information about multiple plausible continuations.
- A
- 38
In the “My name is” example, what advantage does a teacher model provide during distillation?
- A
A single context can convey a useful distribution over possible names instead of requiring many examples of names
- B
The teacher removes the need for the student to process the preceding context
- C
The teacher guarantees that the student will memorize every name in the language
- D
A single example forces the student to assign equal probability to all names
Correct answer
AA single context can convey a useful distribution over possible names instead of requiring many examples of names
Explanation
The teacher's prediction can represent the relative plausibility of many names in one example, whereas ordinary training directly emphasizes only the observed name.
- A
- 39
What does KL divergence measure in the compression interpretation?
- A
The total number of symbols shared by two coding alphabets
- B
The probability that a compressor will produce an identical file twice
- C
The extra bits per symbol wasted by using a code that is not optimized for the actual distribution
- D
The minimum number of bits required by an optimally matched code
Correct answer
CThe extra bits per symbol wasted by using a code that is not optimized for the actual distribution
Explanation
KL divergence is the difference between cross-entropy and entropy, representing the excess coding cost caused by using a mismatched distribution.
- A
- 40
What is the value of KL divergence when the two distributions are identical?
- A
The entropy of the first distribution
- B
One bit
- C
Zero
- D
The number of possible outcomes
Correct answer
CZero
Explanation
When the distributions match, there is no mismatch cost, so KL divergence is zero.
- A
- 41
Why is KL divergence not an ordinary symmetric distance?
- A
The KL divergence from one distribution relative to another can differ from the reverse-direction divergence
- B
It is always negative for distributions with different supports
- C
It can never equal zero even when the distributions match
- D
It ignores the probabilities in one of the two distributions
Correct answer
AThe KL divergence from one distribution relative to another can differ from the reverse-direction divergence
Explanation
KL divergence is asymmetric: generally, the divergence of Q relative to P is not equal to the divergence of P relative to Q.
- A
- 42
How is KL divergence related algebraically to cross-entropy and entropy?
- A
It is entropy minus cross-entropy, with no change in sign
- B
It is cross-entropy minus the entropy of the actual distribution
- C
It is the product of cross-entropy and entropy
- D
It is the sum of the two entropies, independent of cross-entropy
Correct answer
BIt is cross-entropy minus the entropy of the actual distribution
Explanation
For the relevant ordering of distributions, KL divergence equals cross-entropy minus entropy. This is the excess coding cost due to mismatch.
- A
- 43
Why might KL divergence seem like a natural alternative loss for distillation?
- A
It removes all dependence on the teacher's predicted probabilities
- B
It measures only the number of tokens in the teacher's output
- C
It guarantees that the student uses fewer parameters than the teacher
- D
It directly measures the mismatch between the teacher's and student's probability distributions
Correct answer
DIt directly measures the mismatch between the teacher's and student's probability distributions
Explanation
Because KL divergence is zero for matching distributions and increases as they differ, it appears to be a natural distribution-matching objective.
- A
- 44
What broader connection does the shared appearance of cross-entropy suggest between language-model training and compression?
- A
A language model can be trained without probabilities if compression is available
- B
Cross-entropy proves that every compressed file contains a complete language model
- C
Training a predictor to reduce average information per token can also train it to support efficient compression
- D
Compression and language modeling must use identical algorithms internally
Correct answer
CTraining a predictor to reduce average information per token can also train it to support efficient compression
Explanation
A predictor's probabilities can determine coding lengths. Therefore, minimizing average negative log probability can be understood as improving the model's ability to compress text.
- A
- 45
How can a language model be viewed as a compression system?
- A
Its predicted probability for each next token can determine approximately how many bits are needed to encode that token
- B
It stores every training document verbatim and retrieves the matching document at decoding time
- C
It compresses text by deleting all tokens that have low predicted probability
- D
It assigns the same fixed-length code to every token regardless of context
Correct answer
AIts predicted probability for each next token can determine approximately how many bits are needed to encode that token
Explanation
A model's predicted probabilities can be converted into information values and coding lengths, allowing text to be encoded according to its contextual predictability.
- A
- 46
What would an ideally trained language model's average information per token approach?
- A
The maximum possible vocabulary size
- B
The number of parameters in the model
- C
The entropy of the language distribution represented by the data
- D
The average length of a training document in characters
Correct answer
CThe entropy of the language distribution represented by the data
Explanation
If the model accurately captures the language distribution, its average negative log probability can approach the entropy of that distribution.
- A
- 47
What limitation of gzip matters when interpreting its language-distance estimate?
- A
Gzip requires explicit linguistic rules before it can compress any document
- B
Gzip cannot process text from more than one language at a time
- C
Gzip produces probabilities that are always exact descriptions of language
- D
Gzip is far from achieving the Shannon limit and mainly exploits repeated sequences with pointers
Correct answer
DGzip is far from achieving the Shannon limit and mainly exploits repeated sequences with pointers
Explanation
Gzip uses a relatively straightforward repetition-based method and is not an ideal Shannon-limit compressor, so its estimate of cross-entropy is only approximate.
- A
- 48
Why is cross-entropy useful beyond the specific language-tree example?
- A
It quantifies how patterns in one setting differ from patterns in another setting
- B
It identifies only relationships that have already been specified by an expert
- C
It measures document length without using any distributional information
- D
It applies only to files containing alphabetic characters
Correct answer
AIt quantifies how patterns in one setting differ from patterns in another setting
Explanation
Cross-entropy broadly measures the coding performance of one statistical model on data generated under another, making it useful for languages and machine-learning models.
- A
- 49
What does the phrase “compression is intelligence” suggest in the context of language models?
- A
Intelligence can be measured only by the physical size of a compressed file
- B
Any file-compression program necessarily understands language like a human
- C
A strong predictor can be interpreted as a strong compressor because accurate predictions reduce the bits needed to encode text
- D
Language models become intelligent only after their outputs are saved in compressed format
Correct answer
CA strong predictor can be interpreted as a strong compressor because accurate predictions reduce the bits needed to encode text
Explanation
Accurate prediction makes text less surprising from the model's perspective, lowering its information content and enabling more efficient encoding.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.