Chris X Edwards

Staring at their phones while walking across parking lots. Because city daredevils have neither bears nor sticks to poke them with.
2017-11-22 09:49
People who apologize for troubling me when I'm just doing my job are never the ones who should apologize.
2017-11-21 14:34
A gluten allergy, eh? How did you rule out a thiamine mononitrate allergy? Or niacin? Or folic acid? And their adulterants?
2017-11-18 10:24
Wow. Just watched a police shooting from my balcony less than 100m away. Crazyland.
2017-11-17 08:43
TPMS sends pressure and temperature for each wheel which gets squandered down to just one barely useful idiot light on the dashboard. Sad.
2017-11-16 23:23

Lessons From Heavy Metal

2017-11-20 10:02

When I was thinking about neural networks and trying to come up with a better metaphor than brain physiology, I reflected on my machine shop experience. A long time ago, I had a very good job where I was the engineer for a 150k sqft heavy manufacturing facility. It was basically a subcontract machine shop for workpieces on the enormous end of the scale.

Although I was a very young guy at the time, the owner entrusted me personally with a prodigious amount of responsibility. At the time, I didn’t think much about it but when I look back on the things I managed, wow! The owner would buy old machine tools from failing manufacturing plants and my job was to reverse engineer their installations and create the same in our plant. Although my 3d modeling skills were not too challenging to me, they were very rare at the time and profoundly helpful for these projects.

What reminded me of the machine shop was after hearing the machine learning word "weight" be called "adjustment" enough times, I thought of these.


These are leveling screws. I actually invented these ones. Commercial ones were something like $150 and I realized that we could just make our own from electrical boxes and tube stock (it was a machine shop after all). We were able to get these down to about $20 each. As you can see we had many projects which ultimately used thousands of these cans. That’s the kind of thing I did to add value.

The way these anchors work is that you embed them in concrete so that you can hold a machine tool tightly to the floor. Between the machine tool and the floor is a leveling jack which can push the machine away from the floor. In this way you could "adjust" the machine tool’s pose.


The next trick was getting all the cans in the right place. This was something else I was responsible for. I managed the layout, the excavation, the setup, and the concrete logistics. Communicating to a concrete contractor how a hundred of these cans needed to hang in space before the pour was step one and step two was helping to design the scaffolding that could accomplish that. Then I was responsible for final inspections before the pour.


Once the concrete was poured, the leveling jacks were set in place and themselves leveled with their own leveling system. Small forms were used to pour grout to lock them in place.


Once the leveling jacks were fixed to the floor, the machine would be brought in. This photo shows a large Schiess CNC horizontal boring machine’s bed being placed in an installation I designed. Because of such projects with German equipment, I was the plant’s German translator too — before I learned German! I can’t quite remember what that cut out on the back wall was for but it was for something tricky like clearance to remove one of the motor shafts if it ever needed replacing. Stuff like that has to be thought out well in advance.

Here’s a picture of Howard leveling a machine.


He is adjusting the "weights" using non-artificial intelligence. The cost function is how straight and flat this table will move and the straightedge spanning the way surfaces is how he is intuitively not using the chain rule of calculus to link his adjustment actions to the final reduced error. Howard and all the mechanics were extremely good at this kind of thing. Their mechanical aptitude was humbling.

Here is a nice sequence of an installation I designed that shows how the leveling process could be rather complex. This vertical boring machine starts with a ridiculously complex geometry as set by the machine’s clearance requirements.


All of those jacks have to be precisely angled to get correct access to them. You can see that the straightedge is being used to make sure the levelers are all level (horizontal and coplanar). Note that each of these jacks has 4 leveling screws.


Once the base of the jacks are set in place, it looks like this.


After the bed and the columns are set on the jacks and assembled, the machine needs to be leveled. I don’t know if they’re bolting the column to the base or if they are already doing some leveling on the jacks. Either way, they need to reach through holes in the casting to do that and that’s why getting the angles perfect is not an optional feature.


If you want to think about this (very, very roughly) as a metaphor for machine learning, consider that the cost function, the "error", arises from an assembly of many moving parts. Not only do the bed and table need to be level, but that affects the columns, which affect the rail, which affects the heads, which affect the cutting tools, etc. Each of these pieces has their own adjustments, though just like most neural network architectures, fewer the closer you get to the measured error.

And finally, here is the finished installation actually turning a profit.


You can see the kinds of parts this machine works on. It can cut the mating surfaces of this power generation casing or the bore of the press base (I think that’s what that is) spinning on the machine. (There is an unrelated press bases in front of the fork lift.)

The Australian guy running this machine is one of the smartest people I’ve ever worked with and I work with a lot of molecular biotech people with PhDs. (That’s why he’s getting first shot running this thing.) The owner of the whole place is also a brilliant machinist (best in the world in my opinion) with a level of genius you hope to find in the halls of academia but too often don’t.

It’s interesting to contemplate why this installation is lowered into a pit. Basically when the machine was purchased the owner had the correct intuition (and I numerically verified) that the thing would not clear our overhead cranes. He also correctly guessed that his engineer could design an installation that would make it work out. And there it is!

Machine Learning - A New Metaphor

2017-11-19 22:00

When I studied the latest machine learning best practices earlier this year, the experience was like having Sherpas guide me up Mt. Everest. Though that rarefied atmosphere was pretty exhausting, I’m no script-kiddie tourist. I wanted to revisit this mountain unguided and tackle it in my own way.

As you can see, I like metaphors. The first thing I felt needed to happen was to critically scrutinize the primary metaphor of machine learning, neural networks. Every lesson on neural networks starts with a half-hearted neurophysiology lesson which is accompanied by enough hand waving to generate a breeze. The problem, as the instructor makes clear eventually, is that the neural networks of machine learning don’t really have as much to do with the meat in your head as the course name might suggest.

…originally motivated by the goal of having machines that can mimic the brain. …[the reason for learning is] they work really well… and not, certainly not, just because they’re "biologically" [air quotes!] motivated.

— Andrew Ng

Due to all these and many other simplifications, be prepared to hear groaning sounds from anyone with some neuroscience background if you draw analogies between Neural Networks and real brains.

— Andrej Karpathy

It is often worth understanding models that are known to be wrong (but we must not forget that they are wrong!)

— Geoffrey Hinton

As best I can figure, back when Isaac Asimov started publishing robot stories (about 1950) people got the idea that synthesizing a human-like machine was a credible aspiration. Turing did nothing to dampen such enthusiasm with his famous imitation game test around the same time. The target was drawn and the goal was clear — build a machine that passed for human, cognition included.

As ever more complicated physics continued to prove useful, no phenomena was considered fundamentally unknowable. Why not the human mind? The famous McCulloch and Pitts paper of 1943 is an uncanny predecessor of modern machine learning texts insofar as it starts with vague neuroscience mumbo jumbo and devolves into mathematical glossolalia by the end.

I think it is now simply a sacred tradition to casually mention some meaningless trivia about the human brain before talking about the kinds of thinking that machines might be able to do. This is kind of like a Sherpa Puja blessing before a climb. No harm done, right?

pyml.png This book cover features an image of the neurons in your head that you will use to understand machine learning. Nothing more.

But does this digression help anything? I say no. I believe pointless nonsense about neurons wastes the mental space that a metaphor truly useful to beginners could occupy. For example, every computer science professor and every student just filing out of their first machine learning lecture knows what an axon and a dendrite is. To me that is completely wasted educational effort.

How should machine learning be introduced? That’s a good question and I don’t pretend to have the optimal answer. All I know is that when I was learning this stuff, I felt cheated by the neuro preliminaries and I struggled to make sense of what was really going on in that context. Later after getting some experience with various neural network architectures, I tried to come up with a better way for beginners to understand what modern "neural" network machine learning is all about.

I have come up with a physical analogy that I think is illustrative and educational even if it is not perfect. It is certainly more helpful than axons and dendrites! By making the system physical I feel like some intuition can be applied. My analogy can take many forms but let’s start with this simple one. It’s a bit silly but bear with me.

Imagine a telephone pole needs to be replaced. You don’t have a spare straight pole but there is a natural tree-shaped tree nearby that needs to be cleared anyway. A crew cuts down the tree with a chainsaw and then cross cuts the trunk into logs.

You stack the logs vertically end to end at the site of the old pole and when you’re done the new pole is very precarious of course. Let’s not worry about that; we’ll assume it eventually gets wrapped in fiberglass or something. The real problem here is that the top of the pole is not lined up with the bottom of the pole. You disassemble the stack of logs and drive three 40mm screws 20mm deep into the end of each log forming a triangle.


If you’re very accurate with that, you should be able to stack the logs again, resting on the screws now, and a plumb line from the top will not have moved any closer to the base.

If this mechanical system is a metaphor for machine learning, then the thing we’re trying to "learn" is how much adjusting do we need to apply to each of the leveling screws in each log to make the top line up with the bottom.


This is obviously a hard problem. If there are 6 logs then there are 21 screws that can be adjusted. The way any particular screw at any particular level gets adjusted has different effects depending on what level it’s at and what the others are doing. To adjust these screws you really have to disassemble the system from the top.

If you don’t know much about machine learning, this is a good start. The goal is to bring the top of the log tower to a target position (over the base) by changing the settings of some adjustment screws. In machine learning each log would be a "layer" of the network and the more logs, the "deeper" the network. Logs between the top and bottom log are called "hidden". In theory, there are settings where the pole could snake up in a wild curve as long as the top made it back to the same horizontal position as the base. As with machine learning, the pole is built from the bottom up. You know the location you put the first log. That is the "input" and when you’re done stacking, you can check where the top ends up. You then have to disassemble the log tower from the top down to make adjustments to the leveling screws.

This disassembly is the "back propagation" operation in machine learning where it is a bit more complicated. The reason is that in my log example, I don’t know exactly how you would know how to adjust the screws. You’d pretty much have to guess and use intuition, something the mathematical version cleverly avoids. The screws are like the "weights" in machine learning, just adjustable parameters that make the structure do what it’s going to do. In proper machine learning back propagation, the whole point is that you can calculate from the top’s error down each level and figure out how much you should be turning each screw in the system. You do those calculations, make the adjustments, rebuild the pole, and check the new error. Repeat until it’s lined up.

Ok, now that you’ve pictured that, let’s expand that thought experiment. Now imagine that you have a similar system but instead of logs, you have a big sheet of 10mm thick rubber, maybe 1m square. Every 5cm on a 20 by 20 grid you have a leveling screw set into it just like the 3 in the logs. That’s 400 leveling screws that can be adjusted. And on top of that sheet of rubber, you put another one just like it but this one will be set off by the height of a screw set on a grid every 10cm, so 100 screws on this level. Now imagine carrying on like this for another 6 layers or so each time reducing the number of screws and even the area of rubber needed. Finally you get to the top layer and it has a single screw sticking out of it. That final screw is near the ceiling and there is a line painted on the ceiling.


Got all that? Here’s the interesting part. Let’s say you have a bunch of low relief sculptures of either dogs or muffins (or whatever). If you can somehow slide these sculptures one at a time under your big pile of rubber and screws, what you would like to happen is that when a dog carving is under the pile, the top screw points to the right of the line on the ceiling, and when a muffin carving is under the pile the top screw points to the left of a line. That way, if you didn’t know if a relief sculpture was a dog or a muffin, by putting it under this giant mess, you could read the top screw and learn that system’s interpretation. The key trick to machine learning is how the hell are we going to correctly set all those damn screws (thousands, maybe millions!) to pull off this kind of ridiculous miracle. As unlikely as my physical analogy makes it sound, it turns out that when the adjusting screws are mathematically based, the layers are designed just so, and massive GPU power is pumped into calculating the number of turns each screw needs, this kind of crazy contraption works!

I’m not suggesting anyone rush out and try to construct a dog detector out of sheets of rubber! This is just to give you a very rough physical intuition of what the hell is going on with machine learning methods before you tackle the mathematical magic which makes it all possible. You may find this conception of what machine learning is like to be implausible, pointless, and completely erroneous. Well, that’s par for the course here! Once I started thinking of machine learning like this, I was finally able to get a solid understanding of what the math was doing.

For people with no actual interest in applying machine learning themselves, this analogy might be interesting just to see what the AI hype is really all about and the implausible seeming model it’s based on. It may be implausable but it does often make uncanny true predictions. I’m not sure this miraculous lack of complete failure has anything to do with human cognition, but I’ll allow that it may be giving us hints about that too. Let’s just not start with that!

Scaring The Nation With Their Guns And Ammunition

2017-11-17 12:04

Here’s a surreal view of my neighborhood.


We heard some commotion outside and tons of cop cars started filling the street. I grabbed my binoculars and had a strangely perfect view of a backyard where at least six cops were carefully surrounding a house, guns drawn. A couple of them seemed to have brightly colored shotguns. Eventually there was even a tail-wagging police dog. I saw some guy in a white tee shirt hurry past my field of view into the brush. He looked like he was attempting to flee up the steep slope that typically separates SoCal yards built on hills. The cops had totally anticipated this and had all plausible paths blocked. We heard a lot of shouting. It sounded like the cops were commanding someone to "put down the…." something. Gun? Knife? Couldn’t tell. But they had definitely made contact with their quarry and had definitely been very clear that what he was holding was not going to be cool.

Then I heard a big blast that sounded to me like a shotgun or a powerful handgun. The cops were in full combat mode. Then I heard a couple more gunfire noises but they were much quieter like the sound a stick makes when you whack it on a rock. (I may have the order and number of shots a bit muddled but it was something like that.) Very soon after that none of the cops had their guns drawn. I saw the orange shotguns being carried away safely pointed skyward and not toward the bushes.

Then I realized I could see a person lying in the backyard. An ambulance and fire truck arrived and started working on the antagonist (hard to think of this guy as the "victim"). They were definitely giving too much attention for him to be dead. I even saw him moving. They cut off his shirt which appeared to be bloody. They put him in a neck brace and pretty quickly they wheeled him out and drove him away.

News crews arrived and pretty quickly reports appeared on line. Apparently the bright colored shotguns are to designate them as loaded with bean bag rounds. That name makes one think of a comfortable yet awkward piece of 1970s furniture, but in this case the word "bean" is even more misused. These guns shoot bags filled with lead shot which will not be comfortable to catch.

I have to say that for a situation involving dozens of guys running around outside my home with loaded guns drawn, this ended pretty well. Not only do San Diego police have some ability to not kill antagonists, they all seemed very professional and quite well trained for such things. After the kinds of things I heard the cops yelling at this guy, I thought he was a dead man for sure.

That fact that it is being reported that he will survive has some subtle but important secondary effects. These idiot guys (95% male) who contemplate suicide by cop will have to recalculate if cops are no longer playing along. Not only that but cowardly suicide terrorists need to be pretty damn sure they don’t want to spend a lifetime in some very bad place after recovering from a very, very bad day. When cops kill people it is usually more or less than the targets deserve. This seems to be getting the balance right for both of those problems.

The Web And Its Heroes

2017-11-11 20:26

I fell into a pretty deep rabbit hole today! Being silly, I had this idea that there sure are a lot of web developers and isn’t that funny since these days there are only a couple of web sites left. Very droll, eh?

But seriously… The BLS says there are 162,900 web developers sharing the blame. And just how many web sites are left anyway? I discovered Quantcast’s rankings of website popularity. I’m not endorsing it or saying it’s completely accurate, but it definitely is interesting. They even have a data set of the top 1 million web sites that you can download. (Of course it only contains 527614 but let’s not quibble with free data.)

Here are the top 50 web sites according to Quantcast which makes for an interesting reality check.














  14. Hidden profile


  16. Hidden profile











  27. Hidden profile




  31. Hidden profile






  37. Hidden profile



  40. Hidden profile


  42. Hidden profile


  44. Hidden profile




  48. Hidden profile



I’m not sure exactly what "Hidden profile" indicates (pr0n?). There’s nothing too shocking on that list really except at lucky 13. How can they still be in business, never mind a hot web property? Yuck! And that is pretty awful too. Otherwise I’m not shocked by this list.

Pulling the monthly distinct user counts from their web listing, I made this demonstration of a perfect example of a mathematical phenomenon known as the power law.


(Do you like how I included internet kittehs?)

This list is full of interesting information. Here are the top 25 .edu sites shown with their overall rank.

  1. 465

  2. 503

  3. 518

  4. 562

  5. 599

  6. 742

  7. 786

  8. 866

  9. 901

  10. 998

  11. 1053

  12. 1106

  13. 1115

  14. 1156

  15. 1198

  16. 1250

  17. 1294

  18. 1307

  19. 1402

  20. 1406

  21. 1430

  22. 1470

  23. 1508

  24. 1527

  25. 1538

I’m pretty impressed that UCSD makes the list. Here are a couple of other interesting (for personal reasons) edu sites farther down the list.

  • 111. 5049

  • 149. 6208

  • 150. 6237

  • 254. 10439

How does on-line education compare? Here’s where these on-line education sites rank overall.

  • 347

  • 1015

  • 1114

  • 1782

  • 2128

  • 5483

  • 7438

In honor of Militarism Glorification Day I had a look at .mil sites.

  1. 2294

  2. 2333

  3. 2761

  4. 2880

  5. 5810

  6. 7359

  7. 9252

  8. 10053

  9. 10156

  10. 11290

I actually didn’t even know what was and that as a URL goes nowhere. It’s actually "Office of the Secretary of Defense" and has tricksy URLs like this. I have no idea what happened to which is definitely a real thing. It’s not even on the list at all. Maybe they use internet camouflage. There were these.

  • 3576

  • 6356

But the interesting thing to note is that there are around 10 mil sites in the top 10000 list. I think if we plotted ritual adulation of various government organizational units, we’d see another clear power law law with the military grabbing all the glory.

What about all the people serving their country peacefully? This list provides a pretty interesting look at what our tax dollars are buying. Here are the top 100 .gov web sites; these all make the top 10000 overall list.

  1. 114

  2. 230

  3. 350

  4. 366

  5. 422

  6. 441

  7. 448

  8. 624

  9. 662

  10. 687

  11. 699

  12. 717

  13. 878

  14. 931

  15. 1006

  16. 1071

  17. 1126

  18. 1139

  19. 1235

  20. 1353

  21. 1366

  22. 1390

  23. 1394

  24. 1410

  25. 1518

  26. 1525

  27. 1530

  28. 1611

  29. 1687

  30. 1722

  31. 1774

  32. 1777

  33. 1853

  34. 1910

  35. 1952

  36. 2085

  37. 2233

  38. 2246

  39. 2309

  40. 2439

  41. 2464

  42. 2528

  43. 2595

  44. 2719

  45. 2813

  46. 2852

  47. 2864

  48. 2934

  49. 2997

  50. 3092

  51. 3130

  52. 3132

  53. 3214

  54. 3224

  55. 3245

  56. 3251

  57. 3312

  58. 3362

  59. 3475

  60. 3513

  61. 3582

  62. 3735

  63. 3828

  64. 3871

  65. 4081

  66. 4122

  67. 4141

  68. 4169

  69. 4311

  70. 4317

  71. 4685

  72. 4815

  73. 4951

  74. 5111

  75. 5298

  76. 5550

  77. 5806

  78. 5938

  79. 6117

  80. 6167

  81. 6746

  82. 6799

  83. 6845

  84. 7045

  85. 7496

  86. 7750

  87. 7900

  88. 8622

  89. 9047

  90. 9136

  91. 9152

  92. 9167

  93. 9249

  94. 9493

  95. 9524

  96. 9553

  97. 9649

  98. 9828

  99. 9832

  100. 10021

(I manually removed local websites ending in .gov e.g. I’m sure they’re doing important things too but I wanted to focus on the national level.) I found this list quite interesting and full of insights. For example, I’m reminded how creepy is; why not just call it Waffen-SSS? Seriously, that would actually fit those guys.

But that’s an exception. A lot of these sites are quite uplifting. I was encouraged to see the NIH so high up. Hey, they are definitely helping me to fight the good fight on behalf of real Americans against the shady side of big pharma. People laud the courage of soldiers and that’s fine, but let’s take a moment to consider the CDC. If we’re going to talk about making Americans secure, we’d better say some good things about the CDC. I recently was in a high security medical research vivarium and the intense safety protocols remind one that if you want a job where dying a gruesome death is possible, the military isn’t the only way to go. But if you do the job well, you can maybe prevent a pandemic from killing half of humanity.

In the mainstream media’s desperate quest for lurid sensationalism you don’t hear about little things like the Thrift Savings Plan (whatever that is) helping victims of the California wildfires. Or that the SEC is righteously punching back at some pharma scumbags. Do you like having electricity? Apparently the EIA is helping by obsessively worrying about that so you don’t have to. Yea! And there are so many things on this list that are real treasures. For example, the National Park Service. Also the USGS has been a go to resource for maps and tons of other important things long before the internet existed. Same with NOAA and it’s pal And at 624, NASA is a not just an internet rock star; it is the team that scored some of humanity’s most stunning achievements.

And this is just the popular stuff. There are tons of things farther down the list buried in undeserved obscurity. For example, at 13785 is the National Gallery of Art and 10064, the National Endowment for the Humanities. Why is only 10213?

In closing I’ll also mention my favorite government heroes. Some people have that urge to see the world and meet interesting people but are heroically squeamish about killing them willy-nilly. I suspect that The Peace Corps web site would be more popular (than 14528th) if they weren’t systematically sent to the places in the world least likely to have good wifi. So bravo and thanks to the Peace Corps volunteers who sacrifice so much to show the world that not all Americans are assholes.

3D Sintering

2017-11-10 17:04

In the past I have never felt much enthusiasm for 3d printing. I just discovered what El Reg calls "metal 3d printing". Although they’re missing a huge chance to cleverly call it "3d sintering" or even "3d sinting", I am actually quite optimistic about this technology.

Sintering is a very smart technique which can create very interesting results. Unlike thermoplastic resin (hot glue gun) 3d printing, metal sintering has the potential to make things that are actually useful. In a wild speculative way, I can imagine very exotic workpieces with difficult geometries and even clever tricks like different metals fused into the same part. It seems like a genuine amalgamation of the reasons for the 3d printing hype and the reasons to persist with traditional metalworking.

The company driving this technology, Desktop Metal, seems like they’ve got a sensible manufacturing product. The idea seems sound. Rather than replace traditional machine shops, I think that the bigger threat is to traditional small foundries. The Desktop Metal marketing literature suggests that you can "apply optional finishing methods such as machining or bead blasting for critical tolerances and finishes". It sounds like this would be perfect to combine with a benchtop milling machine.

But still, replacing an exotic metals foundry with a piece of office equipment is quite a trick. I have to say I never would have imagined the existence of an "…office-friendly sintering furnace with a peak temperature of 1400C, allowing for the sintering of a wide range of metals." That just sounds crazy but if it works then I’m impressed.

On the other hand, this same office sintering furnace is also described as "cloud-connected" so maybe it is nothing more than posturing and nonsense. I do think the concept seems reasonable. It will be interesting to see how this system performs in the real world. I am hopeful.


For older posts and RSS feed see the blog archives.
Chris X Edwards © 1999-2017