November 23, 2026
Thinking About the Swing as a Compression Problem
A working paper arguing that data compression describes both the information processing and ecological views of how a hitter learns, and that the two make the same prediction about swing variability.
1. Introduction
Figure 1 shows 14 swings from one hitter in one session, following how far his shoulders have turned over the last 300 ms before contact. Panel (a) lines the swings up at contact, which is the usual way to compare swings, and the lines spread apart as contact gets closer. Panel (b) lines the same swings up by where the bat is, and most of that spread goes away. So a large part of the variation in his shoulder turn is in when he turns and not in how he turns. Panel (c) shows the same result for every hitter in the lab, and it shows that the lead arm is different. The spread in the arm is larger, it grows into contact, and lining the swings up by the bat does not remove it.
That picture is hard to explain if learning to hit means learning to repeat one movement. The timing changes from swing to swing and the arm takes a different path on each one, yet Section 5 will show that the joints of nearly every hitter in the lab vary together in a way that protects the direction of the bat. So the question is what a hitter learns, given that it is not one movement that he repeats.
My answer started with 3Blue1Brown’s series on compression [2, 3]. The idea that stuck with me is that compression and prediction are intrinsically related. If you already know what is coming next, the information required to describe that event is lower. My argument is that a hitter learns a compressed form of the mapping from the pitch he sees to the swing he makes. A good compressed form keeps what the outcome depends on and lets the rest vary.
There are two main views of how people learn movements. The information processing view treats the athlete like a computer that perceives, decides and then executes a stored plan. The ecological view says that movement comes from the interaction between the athlete and the environment, with no stored plan needed. I argue that compression describes both, and that the two make the same prediction about variability.
The information processing view starts from the fact that the nervous system is slow compared with a swing. A signal takes time to travel from the eye to the brain and from the brain to the muscles, so feedback about a movement arrives after much of the movement is over. The proposed solution is an internal model, a learned prediction of what a motor command will do. It lets the brain act on the predicted result of a command without waiting for the real one. Internal models are thought to be learned mainly in the cerebellum [4]. A second set of structures, the basal ganglia, is thought to pack sequences of actions that are practiced together into single units [5]. That is the chunking that Section 4 will cover.
The ecological view starts from the fact that the brain does not control each muscle separately. Muscles are activated in groups called synergies. A small number of synergies, combined in different amounts, can produce a wide range of movements, which was first shown in recordings from frogs [6]. The body therefore has far fewer things to control than it has muscles and joints. The stable patterns it settles into are the attractors that Section 6 will cover.
Both sets of mechanisms reduce the amount of information the brain has to handle. Prediction removes the wait for feedback, chunking turns a sequence into one unit, and synergies turn many muscles into a few groups. Neuroscience has described the nervous system this way for a long time. Barlow proposed in 1961 that the job of sensory neurons is to remove redundancy from their inputs, which amounts to saying that the nervous system compresses [7].
2. Movement was being measured in bits a long time ago
A bit is the amount of information in one choice between two equally likely options. Shannon generalized that. An event with probability
Two of the oldest results in motor control are written in these units. Hick showed that the time it takes to react rises linearly with the information in the choice being made [9]. Fitts showed that the time it takes to move to a target rises linearly with an index of difficulty, which is also measured in bits [10]:
Here
This matters for hitting because the hitter has almost no time. He has to read the pitch while the pitcher is trying to keep him from figuring out what is coming.
Practice changes the numbers. Mowbray and Rhoades found that with enough practice, reaction time stopped rising between two and four choices [11]. The slope
That leaves two things to work out: how much of the movement practice can organize in advance, and what still has to change as the hitter reads the pitch. Section 3 will cover what practice teaches the hitter to expect.
3. Compression is prediction
3.1 Cross-entropy as the cost of a wrong model
A compression code gives short codewords to things that it expects and long codewords to things that it does not expect. That only works if the expectations are right. Suppose the thing being compressed actually follows a distribution
The right side has two parts.
Language models are trained on this quantity. A language model reads text and assigns a probability to each possible next word. Its training score is the average of
For a hitter, take the event to predict as how the pitch will actually move: where the ball will be when it reaches the plate, given what he sees at release and early in its flight. The release point, arm slot and spin set up an expectation of how much the ball will rise or sink and run or cut. A pitch that moves the way he expected is cheap. A pitch that moves differently, such as a sinker out of a slot that usually produces ride, or seam-shifted wake movement that the spin alone would not predict, is the surprise, and it shows up as a swing in the wrong place. Practice against a pitch shape can improve how well his expectations match how that pitch really moves (Figure 3).
3.2 Blocked practice as overfitting
In blocked practice, the learner repeats one task many times before moving to the next. In random practice, the tasks are mixed. Learning is then measured in two ways: a retention test, which repeats the practiced tasks after a delay, and a transfer test, which uses a new version of the task. Shea and Morgan found that the blocked group performed better during practice and worse on both tests [13]. Hall and colleagues ran the same comparison with college hitters and found that random-order batting practice beat blocked practice on the transfer tests [14].
Machine learning has a name for that gap between practice and transfer. A model is overfit when it has a low cost on the data it trained on and a high cost on new data, because it learned the training data and not the real distribution. Performance during practice is the cost on the training data, and retention and transfer are the cost on new data, so blocked practice looks like overfitting. The challenge point framework makes the related argument that learning depends on how much usable information a task offers a particular learner [15]. In practice, once a hitter can make a new move in a blocked round like front toss, I change what he has to read and what earns him a point.
3.3 Bad data and a bad value function
There are two ways to end up with a bad model.
The first is bad data. A model can only learn the distribution it is trained on, and a model trained on the wrong distribution gets good at the wrong thing. For a hitter the data is the mix of pitches he practices against. If that mix does not look like what he sees in a game, his expectations fit the drill and not the game. A hitter can learn the rhythm of a drill so well that he starts on time and does not read the ball. For a round to carry over, it has to include some of the cues and uncertainty he will face in a game.
The second is a bad value function, meaning the thing the learner is rewarded for. A model can train on good data and still be wrong if the reward points at the wrong target. A hitter who is told that backside ground balls are good will get efficient at producing them. Section 5.2 will show that the measure of error decides where the precision goes, so a wrong measure protects the wrong outcome.
Practice gives the hitter chances to repeat whatever solves the game I built. When those pieces start to run together, it becomes expensive to change only one of them, and Section 4 will explain why.
4. Chunking and automaticity
Chunking is one answer to how much of a swing practice can organize in advance.
Early in learning, a movement runs one piece at a time and every piece takes attention. With practice, pieces that always occur together get packed into one unit. Miller called this chunking [16]. Newell and Rosenbloom argued that chunking is why practice curves follow a power law [17]:
where
Chunking is compression. A chunk replaces a long description (every piece, in order) with a short one (the name of the unit). If a hitter can start a familiar sequence as one unit, it takes less attention, which leaves more for the pitcher. Henry and Rogers found that reaction time rises with the complexity of the movement about to be made [18], so my inference is that a practiced chunk is also faster to start, although their experiment did not test that.
The cost appears when a hitter is asked to change one piece of a familiar swing. For a while he has to slow down and attend to a movement that used to run by itself, and output sometimes drops before it comes back. I think part of that drop is the cost of packing the sequence back together.
Masters described choking in a similar way. A skilled performer under pressure starts consciously controlling something that used to run by itself, which amounts to unpacking the chunk, and performance gets worse [19].
5. Why lossless compression is the wrong model
5.1 The problem
Chunking can explain how a hitter repeats a sequence, but it does not say which part is worth repeating. A hitter who rolls over the same ground ball to shortstop every swing is extremely repeatable, and he is also not very good.
The best movers are not that repeatable either. Bernstein filmed blacksmiths whose hammer hit the same spot every time while the arm took a different path on every strike [20].
Compression has two kinds, and they separate these cases. Lossless compression, like a zip file, has to give back every byte. Lossy compression, like a JPEG, is allowed to throw away detail that does not matter to the viewer, and that is the kind the blacksmith is using.
5.2 Rate-distortion
The theory of lossy compression is rate-distortion theory [21]. It gives the smallest number of bits needed when the reproduction
For the simplest case, one Gaussian variable with variance
Two consequences matter for hitting.
The first is that precision is expensive.
The second is that bits only go where the error measure looks. Suppose there are several movement dimensions and the error is weighted,
Bat speed is an example of the tolerance
Figure 4(b) uses the form of Eq. 7 on lab motion capture. It measures how repeatable each part of the swing is, in bits. For each part of the swing,
Where the bat points at contact depends on where the pitch is, so part of the variation at contact is the hitter adjusting to the pitch. Section 5.3 will use a method that can say whether that variation is organized.
5.3 The overlap with the uncontrolled manifold
The spread in Figure 1 shows how much the shoulders and the lead arm vary at each instant, but it does not show what the other joints do on the same swing when one of them changes. The uncontrolled manifold analysis answers that for the direction of the bat.
The uncontrolled manifold (UCM) method starts with a task variable
For each swing, take its difference from the hitter’s average swing and split it into two parts: the part along the manifold, which leaves the bat alone, and the part orthogonal to it, which moves the bat. Then compare the variance of each part, per degree of freedom [23]:
Here
Figure 5 shows the result from 2,096 lab sessions. At contact, the joints vary about 9.2 degrees per degree of freedom along the manifold and 6.4 across it, and the index is positive in 99 percent of sessions. The average index is also positive at every point in the last 300 ms before contact.
I then shuffled each joint’s values across swings within a session, so that every joint kept its own spread but an elbow angle from one swing was now paired with a trunk angle from another. The index dropped to about zero. The structure therefore comes from how the joints vary together, and that explains Figure 1: the arm joints can spread apart while the joints still move in combinations that partly cancel at the bat.
The pink line in Figure 5 dips about 50 ms before contact, and the dip comes from how the swings are lined up. In that line every swing is lined up at contact. Just before contact the bat is turning at its fastest, so a swing that is a few milliseconds ahead of or behind the others has its bat in a different place at the same instant. That difference lies along the swing’s own path, which is the direction that moves the bat, so it gets counted as variance across the manifold. The blue line uses the same swings, with each one slid in time (not stretched) so that the bat passes the same position at the same instant. The typical slide is about 5 ms. Lining the swings up this way removes about 80 percent of the dip. As a check, giving each swing the slide that belongs to a different swing makes the dip deeper. So most of the dip is variation in when the bat arrives. At a given bat position, the joints are as organized late in the swing as they are early.
I also tested whether the index goes up with exit velocity from one hitter to the next. With swings lined up at contact it does not (rank correlation of about 0). With swings lined up by bat position there is a small positive relationship (rank correlation of about 0.07), and it holds when I control for the number of swings in the session and for the lab. Nearly every hitter shows the structure, so the data does not support calling it a marker of skill.
Two things can widen the bundle of swings in Figure 1. Different pitch locations call for different bat paths, and near contact a few milliseconds of timing difference can put the bat several degrees farther around its arc. Figure 1(c) tests the second one. For the shoulder turn, lining the swings up by bat position removes about half of the growth (the SD is 3.2 degrees at the start, and at 20 ms before contact it is 5.5 lined up at contact and 4.3 lined up by bat position). For the lead arm joints it removes almost none (8.6 degrees against 8.7). So timing widens the trunk and does not widen the arm, which agrees with Figure 6 in Section 5.4, where the trunk will be shown to re-time about three times as much as the lead arm.
The connection to rate-distortion is the error measure. If the error I care about is a change in bat direction, small joint changes along the manifold have no penalty, to first order, while across the manifold two deviations of the same size can turn the bat by different amounts. Eq. 8 measures joint variance in those directions, so to get the squared error in bat direction I would also have to account for how strongly each deviation turns the bat.
Todorov and Jordan reached a related idea from optimal control. Their minimum intervention principle says the best controller only corrects deviations that interfere with the task and leaves the rest alone [24]. Rate-distortion theory has been used on human behavior before. Sims applied it to perception [25]. Lai and Gershman applied it to the choice of actions and called the result policy compression [26]. Tishby and Polani [27] and Todorov [28] wrote the cost of control in units of information.
Bloebaum’s pitching research is what got me looking at this. One preprint found that elite pitchers are not more or less complex in how they move on average, and that what separates them is how reproducible that complexity is from throw to throw [29]. The other is a UCM analysis done at each point in time through the delivery. Its title is the finding, that skilled pitching is not less joint variability but better-structured joint variability [1]. Gray found in a virtual batting study that training increased the kind of variability that keeps the bat on the ball [30].
5.4 What the public data looks like
Public Statcast bat tracking records the location and type of the pitch with each swing, so it can separate a hitter’s adjustment to the pitch from the scatter around it.
Start with a hitter’s swing-to-swing variation and remove the part that is explained by the pitch (its height, whether it is in or away, and the pitch type). What is left is scatter that these pitch terms do not account for, so it is an upper limit on the noise. I did this for hitter-seasons from 2024 through 2026 with at least 150 full contact swings, meaning a bat speed of 60 mph or more, which leaves out bunts and check swings. I averaged the leftover scatter over four measurements (bat speed, attack angle, attack direction and swing path tilt). That leftover scatter is a stable trait of the hitter, correlating at about 0.7 from one year to the next. It is only weakly related to production. With bat speed held fixed, hitters with less leftover scatter hit the ball slightly harder (r about -0.15 with exit velocity) and their xwOBA on contact, a measure of expected production, is about the same (r about -0.06). This compares one hitter with another and a hitter can be in it up to three times. It does not show what happens when one hitter tightens his swing.
The part that was removed, the adjustment, is a trait too. The amount a hitter changes his swing path tilt with pitch height correlates close to 0.9 year over year, which is one of the most stable things I have looked at in public data. The extreme cases show the same thing. On home runs hit well outside the zone, the hitter’s posture changes by a large amount to get the bat path to the pitch.
I talk about a hitter having “a swing,” even though I can put 14 of his swings on a plot and see 14 different movements. When I say I know his swing, part of what I mean is that I have a pretty good idea what he will do with a pitch he has not seen yet. That includes how I expect him to change when the pitch is down or away. If my description only fits the one he takes on a belt-high fastball, I probably know less about his swing than I think.
So the variation has two parts. The adjustment to the pitch is stable from season to season. The scatter around it is stable too, and it has little to do with how much a hitter produces. That is why I think of the swing as a short code with a few dials on it, and not as a recording that gets played back. The sequence and rhythm stay about the same, and the dials move with the pitch. Schmidt’s schema theory said nearly this in 1975. It proposed a generalized motor program that holds the features that do not change, with a few parameters set on each attempt [31].
The lab data supports the claim about rhythm (Figure 6). Each swing can be stretched in time to line up with the hitter’s average swing. The variance that the stretching removes is timing, and what is left is shape. Within a round, timing is about 10 percent of the swing-to-swing variance in the joints and shape is the other 90 percent. It differs by segment. The trunk and the rear arm re-time about three times as much as the lead arm (14 percent against 5). Torso rotation re-times the most of any single joint angle at 27 percent, with pelvis rotation next at 17.
6. Conclusion: the two views predict the same thing
The two views from Section 1 are usually treated as a disagreement. I think they make the same prediction about variability, and the lab data matches it. A hitter holds the swing tighter in the directions that move the bat and lets it vary in the directions that do not. The information processing view calls that a lossy code. The ecological view calls it an attractor, and the rest of this section will show why those are two descriptions of one pattern.
I think the environment does most of the teaching, and a lot of my job is building games and constraints where the movement I want is the best solution to the problem. Araujo and Davids argue that what gets acquired in skill acquisition is a better fit between the athlete and the environment, and not a stored thing [32]. Compression fits with that, because it is a statement about how short a description of the swings can be, and it says nothing about where the description is kept.
In the ecological view, a skill is an attractor, a stable pattern that the body settles into and returns to when disturbed. The standard example is the Haken-Kelso-Bunz model of coordination between two limbs. It describes the state of the coordination
The link to bits comes from asking where the ball in Eq. 10 spends its time. The downhill term pulls it toward the bottom of the well, and the noise keeps knocking it away. Over a long time the two balance. If the noise has strength
Eq. 11 is the long-run result of Eq. 10. It says the state is most likely to be found where
Near the bottom of a well the landscape is approximately a parabola,
A swing has many directions to vary in, and the well does not have to be equally stiff in all of them. A well that is stiff across the manifold and shallow along it holds the state where the bat depends on it and leaves it free where the bat does not. That is the pattern in Figure 5. At contact the joints vary about 9.2 degrees along the manifold against 6.4 across it, the index is positive in 99 percent of sessions, and it goes to zero when the joints are shuffled. Section 5.2 reached the same pattern from the other side, where a code spends its bits only on the dimensions that the error measure looks at.
Haken showed that a system with a huge number of degrees of freedom ends up described by a few quantities, which he called order parameters [34]. Friston’s free energy principle is the most formal attempt I know of to say that self-organizing systems settle into attractors by minimizing surprise [35], and surprise is his word for the same
The ecological view uses the word information in Gibson’s sense, which is structure in the light reaching the eye that specifies what the environment allows the animal to do [36]. Shannon’s information is a count of bits and carries no meaning. One question I would like to test is whether the KL term in Eq. 4 gets smaller as a hitter learns to pick up the cues that tell him how a pitch will move.
My answer to the question from Section 1 is that a hitter learns a compressed form of the mapping from the pitch to the swing, which keeps what the bat depends on and lets the rest vary. I do not think coaches have to pick a side. Both theories describe a hitter who has found a shorter description of a swing that still works, and the practice environment decides which description he ends up with.
7. What mixed-pitch lab data would add
Every lab figure in this post comes from swings off straight machine pitches, with no record of where each pitch was. That is enough to show that the variation in a swing is organized. It is not enough to show what the variation is for. Motion capture against a mix of pitch types and locations, with the pitch tracked on every swing, would allow three things.
The first is to separate adjustment from noise in the body. Section 5.4 does this for the bat with public data. With the pitch known, the same split can be made for every joint, and Figure 4(b) can be redone to show how many bits a hitter spends on the pitch and how many are left over. Until then, the variation at contact in the lab is adjustment and noise added together.
The second is to give the uncontrolled manifold analysis the right task. Here the task was the direction of the bat. With the pitch known, the task can be the distance from the barrel to the ball, which is the thing the swing has to get right. The same data would show how much of the variation in when the bat arrives, the dip in Figure 5, is the hitter adjusting to the pitch. It would also remove the need to line swings up by bat position, which takes out some variation in bat direction by construction.
The third is to test the well in Section 6. A pitch that moves differently from what the hitter expected is a disturbance. How the joints respond to it shows how stiff the coordination is in each direction, and whether an adjustment the hitter already makes with the pitch costs less than one he rarely uses.
One thing would still be missing, which is the rate in Eq. 6. Nothing here measures the bits that the hitter’s control uses, and mixed-pitch data would not change that. It would show where the precision goes, and that is the part of the argument that most needs a direct test.
Compression is a reasonable way to describe how hitters adjust. It separates the part of a swing that follows the pitch from the part that does not. Whether it can also be used to evaluate hitters is an open question, and I do not think the data I have can answer it yet.
References
- Bloebaum A. Skilled pitching is not less joint variability but better-structured joint variability: a time-resolved uncontrolled-manifold analysis of the baseball pitching delivery. SportRxiv preprint.
- Sanderson G. Reinventing Entropy. 3Blue1Brown; 2026.
- Sanderson G. But what is Cross-Entropy? 3Blue1Brown; 2026.
- Wolpert DM, Miall RC, Kawato M. Internal models in the cerebellum. Trends in Cognitive Sciences. 1998;2(9):338-347.
- Graybiel AM. The basal ganglia and chunking of action repertoires. Neurobiology of Learning and Memory. 1998;70(1-2):119-136.
- d'Avella A, Saltiel P, Bizzi E. Combinations of muscle synergies in the construction of a natural motor behavior. Nature Neuroscience. 2003;6(3):300-308.
- Barlow HB. Possible principles underlying the transformations of sensory messages. In: Rosenblith WA, ed. Sensory Communication. MIT Press; 1961:217-234.
- Shannon CE. A mathematical theory of communication. Bell System Technical Journal. 1948;27:379-423, 623-656.
- Hick WE. On the rate of gain of information. Quarterly Journal of Experimental Psychology. 1952;4(1):11-26.
- Fitts PM. The information capacity of the human motor system in controlling the amplitude of movement. Journal of Experimental Psychology. 1954;47(6):381-391.
- Mowbray GH, Rhoades MV. On the reduction of choice reaction times with practice. Quarterly Journal of Experimental Psychology. 1959;11(1):16-23.
- Cover TM, Thomas JA. Elements of Information Theory. 2nd ed. Wiley; 2006.
- Shea JB, Morgan RL. Contextual interference effects on the acquisition, retention, and transfer of a motor skill. Journal of Experimental Psychology: Human Learning and Memory. 1979;5(2):179-187.
- Hall KG, Domingues DA, Cavazos R. Contextual interference effects with skilled baseball players. Perceptual and Motor Skills. 1994;78(3):835-841.
- Guadagnoli MA, Lee TD. Challenge point: a framework for conceptualizing the effects of various practice conditions in motor learning. Journal of Motor Behavior. 2004;36(2):212-224.
- Miller GA. The magical number seven, plus or minus two: some limits on our capacity for processing information. Psychological Review. 1956;63(2):81-97.
- Newell A, Rosenbloom PS. Mechanisms of skill acquisition and the law of practice. In: Anderson JR, ed. Cognitive Skills and Their Acquisition. Erlbaum; 1981:1-55.
- Henry FM, Rogers DE. Increased response latency for complicated movements and a "memory drum" theory of neuromotor reaction. Research Quarterly. 1960;31(3):448-458.
- Masters RSW. Knowledge, knerves and know-how: the role of explicit versus implicit knowledge in the breakdown of a complex motor skill under pressure. British Journal of Psychology. 1992;83(3):343-358.
- Bernstein NA. The Co-ordination and Regulation of Movements. Pergamon Press; 1967.
- Shannon CE. Coding theorems for a discrete source with a fidelity criterion. IRE National Convention Record. 1959;7(4):142-163.
- Scholz JP, Schoner G. The uncontrolled manifold concept: identifying control variables for a functional task. Experimental Brain Research. 1999;126(3):289-306.
- Latash ML, Scholz JP, Schoner G. Motor control strategies revealed in the structure of motor variability. Exercise and Sport Sciences Reviews. 2002;30(1):26-31.
- Todorov E, Jordan MI. Optimal feedback control as a theory of motor coordination. Nature Neuroscience. 2002;5(11):1226-1235.
- Sims CR. Rate-distortion theory and human perception. Cognition. 2016;152:181-198.
- Lai L, Gershman SJ. Policy compression: an information bottleneck in action selection. Psychology of Learning and Motivation. 2021;74:195-232.
- Tishby N, Polani D. Information theory of decisions and actions. In: Cutsuridis V, Hussain A, Taylor JG, eds. Perception-Action Cycle. Springer; 2011:601-636.
- Todorov E. Efficient computation of optimal actions. Proceedings of the National Academy of Sciences. 2009;106(28):11478-11483.
- Bloebaum A. Reproducibility of nonlinear movement complexity, not complexity itself, distinguishes elite throwing. SportRxiv preprint.
- Gray R. Changes in movement coordination associated with skill acquisition in baseball batting: freezing/freeing degrees of freedom and functional variability. Frontiers in Psychology. 2020;11:1295.
- Schmidt RA. A schema theory of discrete motor skill learning. Psychological Review. 1975;82(4):225-260.
- Araujo D, Davids K. What exactly is acquired during skill acquisition? Journal of Consciousness Studies. 2011;18(3-4):7-23.
- Haken H, Kelso JAS, Bunz H. A theoretical model of phase transitions in human hand movements. Biological Cybernetics. 1985;51(5):347-356.
- Haken H. Information and Self-Organization: A Macroscopic Approach to Complex Systems. Springer; 1988.
- Friston K. The free-energy principle: a unified brain theory? Nature Reviews Neuroscience. 2010;11(2):127-138.
- Gibson JJ. The Ecological Approach to Visual Perception. Houghton Mifflin; 1979.