Dimensionality reduction (mixing the rational and irrational)

As part of my attempt to move some of what I’ve been doing into ML land (and after having a fruitful geek out with @jamesbradbury) I wanted to try to use dimensionality reduction in a way that still “made sense”.

That is, my understanding so far is that once you go into dimensionality reduction land, you give up the ability to have numbers that relate to real-world units or have “meaning”.

I remember @tremblap mentioning he wanted a better “timbral” descriptor for his LPT idea, and wanted to have a way to have 12 MFCCs reduced down to a single number which better represents the overall timbre than centroid+stats. MFCCs are intrinsically weird numbers though, which I’m sure complicates this a lot.

So I thought about trying to reduce a bunch of my metadata-esque “timeness” units. Mainly things like duration and time centroid, and potentially things like the derivative of loudness (and perhaps at several time scales). I had initially posted some thoughts about this here, but that was before we had the dimensionality reduction tools.

My hypothesis (and goal) is to have a single value that corresponds with how “long” a file sounds, by weighing the actual duration, along with the time centroid and derivative of loudness. That’s the hope at least.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

So I’ve whipped up a test patch, partly for me to make sense of this workflow, but also to see what kind of results I would get.

It creates a fluid.dataset~ filled with units that correspond with milliseconds (0-5000ms) as well as one that corresponds with milliseconds along with some derivative-like units (-2.0 to 2.0).

I purposefully didn’t standardize/normalize the data before fluid.mds~-ing it, since I wanted to keep some differentiation in scale between the different numbers (perhaps a big mistake). I kind of hoped (and falsely intuited) that the numbers that came out would be roughly in the same range/domain as what goes in.

That is most definitely not the case…

Normalizing the data afterwards obviously doesn’t help either.

I tried fluid.standardize~-ing the data pre-fluid.mds~, but I’m getting nans and (end) as the values everywhere, and I don’t know why (separate concern/issue).

So I wanted to post the code, but also ask about this general approach, of using dimensionality reduction to create macro/meta-descriptors which fuse together related data, which is then queried/matched in a contextual way. (As opposed to shoving all the random numbers in a black box and hoping what you want comes out (which I’m not opposed to I guess ))


----------begin_max5_patcher----------
3536.3oc6c88jihaD94Y9qf3mRpLGAIgDPd5RkKUkpR1mRkm15povFrG1ECN
7icm8t51+1iPBvBavVXK4AOGmqyiWIvp6O0cqVBoO+qO9vhkouFluv3uZ7Qi
Gd3We7g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+rMhEmjxOXg1Z23Ta8ekzxO+MzeeW.ve0pvj
hUowbo5iFVlz46QeC4AAjpO4X44ZYS6mE9kLnZELY2yyQIUZbXy8Z8jvah2w
xMBsAnt152rLwMf4S0cVYTg5P9WewVpzG0jrsXmaGEV3LS2uJ2QYsgHbUBqV
lHGH1l8I5zZwfZwWYhUmGUR+B1kfpqihiaUHw8cWyJFuXSlePT04Qt8GwgpK
Gz1aWkxtyS89If3uvAraC1baNttvp0lruOc7s0bWPOKfGypBUaUU8IZQfCtK
+jM0+VH3HPn+6xR2kl09iBgIxq85KKRaUz1CsbyFDr+tutdGx0KJdfykv5h0
mQmgimEj8IpNyd35WlkEOHy.+Fb73u83+GDTrc4A
-----------end_max5_patcher-----------

Absolutely not, no. In the case of PCA, the output range will be in terms of standard deviations (so mostly within ±3 for data that’s normal-ish distributed). For MDS I’m not so sure, but you seem to be getting some values at least comensurate with your largest dimension in the screenshot above.

But what do you mean by the ‘range that goes in’ here? In the un-normalized case, you have dimensions of sugnifciantly different ranges, which is going to give unpredictable results. I would definitely normalize / standardize here. (If you think there’s a standardize bug, please do report it)

So I wanted to post the code, but also ask about this general approach, of using dimensionality reduction to create macro/meta-descriptors which fuse together related data, which is then queried/matched in a contextual way.

Yes, that’s a sensible thing to do, although I don’t completey grasp what matching in a contextual way is getting at?

After winding down for the day I thought to try PCA since it’s the “dumber” of the choices, that it might go with what I’m trying to do better.

I wanted to keep a sense of the difference in scales between the (currently random) entries, but I guess that would still be the case if I either standardized/normalized them anyways(?).

Me neither!

I guess one a simple/pragmatic sense, I could “mix” a bunch of related descriptors together (duration/timecentroid) and then use this single “timeness” metric to bias the query.

So rather than having to chain things together (duration > 1000 and timecentroid > 500), I can just query for timeness > 0.6.

This is likely just me entrymatcher-soaked brain trying to make sense of a knn-y world though.

I’m nowhere near confident that it’s not a meatspace issue with that, but if I find it, I will do.

It’s a case of try-it-and-see. PCA can only produce a linear mapping, which constrains the complexity of relationship between spaces its able to represent. Intuitively, the more drastic a reduction one wants, the more likely it is that having a non-linear aspect to the transformation will be helpful, but it really depends. So, yes, try PCA and see if the results correspond to a sensible representation of ‘timeness’ for your purposes.

Also, with PCA it’s a little easier to grasp what the effect of differently scaled input dimensions will be (because the process is linear), i.e. dimenions with larger ranges will bias the reduction in favour of those dimensions. It’s not at all uncommon to do PCA first and then follow with a non-linear reduction when trying to go from lots of input dimensions to very few.

This is the bit I’m not following. Keep a sense of the difference in scales for the purposes of weighting the dimensions’ relative importance in the reduction?

No: the normalisaing / standardising is done per dimension, explicitly to remove the difference in ranges. At this point it’s more productive to think about how the input data are distributed

In which, yes, this is a perfectly valid approach, but it hinges (per above) on how well the reduced quantity really represents the thing you’re trying to capture. In general, squishing something down to 1D will require a certain amount of experimentation because you’re throwing out a lot of stuff.

They’re not so different!

1 Like

I’ll try PCA and see how that fares. I think if I’m just in millisecond land, it would (intuitively) give results that made sense that way. If I include derivatives that would probably crumble without sanitization.

Curious about this PCA->non-linear workflow too. By this do you mean do PCA on something to bring it down to a smaller amount of dimensions and then to do MDS on that lower dimensional version?

I’m not really clear on things either, but say I have one file with a duration of 5000 and a time centroid of 2500, and another file with a duration of 400 and a time centroid of 200. By not sanitizing the data, I was hoping to maintain that difference in scale, rather than them having somewhat similar values (?) after sanitization.

More practically, I want the fact that the first sample has bigger values to be present in the ‘timeness’ metric that I can query later on, if, for example, I want to choose samples that are ‘timeness’-ier (yikes!).

In spirit I guess, but I’m still struggling with my normal use cases where I can find the nearest match for certain fields, and then some other criteria for other fields (ala biasing).

Depends what you mean by making sense. The output ‘units’ of the PCA will still be in terms of standard deviations, so won’t bear much resemblence to the millisecond input.

Yes. You can think of it as using PCA to make the job of MDS easier by stripping out some redundnacy / correlation in the input. So if you wanted to go from, say, 300 input dimensions to 2, it might be worth PCA-ing down to (say) 50 or something.

The difference in scale would be preserved with either normalizing or standardising; what’s changed is the weighting between the durations and the centroids. In this imaginary two-item data set, normalising would give you two points [0,0] and [1,1], so definitely not similar values). Standardsing would give you two points [1,1] and [-1,-1]. In both cases, the difference is scale is accounted for (quite drastically)

1 Like

Ah right. Yeah, I misunderstood that.

This makes sense, and I’ll have a play to see. For the purposes of this example the starting dimensions will probably be more more than 10ish (overall stats like duration and time centroid, then multiple time scales of loudness derivatives and maybe deviations?). So for these kind of “meta-descriptors”, I wouldn’t have such a massive set of dimensions to start off with, but they are likely related to each other in a more linear-esque manner (e.g. time centroid will always be shorter than duration, the ratio of time centroid to duration may(?) correlate with the derivative of loudness, etc…).

So if I understand you correctly, both standardizing and normalizing those examples would happen in a way where the it would be impossible to tell which one of the two was “longer” in terms of realworld milliseconds. the 2500ms would become either a 0 or -1 and the 5000ms would become either a 1 or a 1, and the same would happen for the 400/200 version.

Maybe this kind of approach would be better suited for vanilla number crunching where I take these numbers and feed them into a function with relative weighting taken into consideration, and it spits out a ‘timeness’ value that way(?).

I still want to push further along this dimensionality reduction approach as it’s a useful vector of getting my head around it, and it may very well be a good approach to do this, but it’s a funky bugger!

On the contrary: in either case the dimensions still exhibit the same ordering after standardising or normalising because all that’s happened at this point is that they’ve been scaled and shifted. So for normalising 5000ms → 1 and 2500ms → 0 because these are the extreme points of the data set (by definition, because it only has two points). If you added a third point of 3500ms this would become 0.4.

However, after doing any kind of dimension reduction, there is indeed no way of determining which file might have been longer to start with

Ok, I took a stab at “manually” creating a timeness metric.

This time I’m using actual values extracted from a larger corpus. I’m taking the overall duration, time centroid, derivative of loudness for samples 0-256, derivative of loudness for samples 0-4410, and derivative of loudness for the whole file.

I started playing with this “intuitively” by trying to weigh different bits of this together, and then trying to merge them.

I started with just the derivatives. I first thought to put the most amount of weight on the first time window, but then thought that it wouldn’t best represent the overall file, so at the moment I’m weighing them like this:
expr ($f1 * 0.25) + ($f2 * 0.25) + ($f3 * 0.5)

I then normalized the duration and time centroid by the maximum duration in this particular corpus. I weigh the normalized centroid with the overall duration, with the centroid itself having the most weight (80%), with my thinking being that that single number probably best represents how long something sounds. I’m weighing it against the overall duration as that would have an impact too. So that gives me:
expr ($f1 * 0.2) + ($f2 * 0.8)

The next bit was a bit tricky as I wanted to take the value I got from mashing the centroid and duration together (which are grounded in units of time) and have those impacted by the derivatives.

For this particular corpus the derivatives (when weighed together as per above) range from -1.051384 to 5.505389. My thinking here is that if the file is going down more than it goes up, which would correspond with a negative/low derivative value, that I would want to bring the overall timeness metric down. And the opposite would be the case for a positive/high derivative.

Since the ranges here vary a bit, I’m only giving a bit of weight to the derivative here with:
expr ($f1 * 0.99) + ($f2 * 0.01)

Finally I take the overall timeness and normalize that back up to 0.0 to 1.0 so for this particular corpus, I now have a ‘timeness’ metric between 0.0 and 1.0 which corresponds to how much timeness-ness each file has.

I had asked @Angie for some help with bits of this and she added an insightful “oh, you’re doing whatever you want”, when I was massaging the numbers, and that’s definitely the case here!

I also massaged and assessed things based on a corpus of struck objects with fairly quick decays (relatively speaking), so no clue if these numbers would hold up with samples with vastly different morphologies.

////////////////////////////////////////////////////////////////////////////////////////////////////////////

I set up a separate part of the patch that handles playback and did some comparing and testing and I have to say the numbers kind of hold up. I mean, it is largely the time centroid with a bit of “pepper” from the other stats (in varying degrees) so that makes sense.

Sadly, I can’t query the samples on the timeness metric with how the patch is setup. I guess I can reanalyze everything and then use timeness to choose which file to play back. That would make it easier to test whether a timeness of 1.0 sounds longer than one which is 0.9.

I did notice that loudness plays a big part of this. Meaning, I may have a file with timeness value of 0.35 which actually sounds shorter than one with 0.25, if it is quieter. That is, the sound drops out of the “plainly audible” range more quickly if it starts off quieter. If I crank the volume up, the sound is indeed longer (or timeness-lier to use the technical term), but that doesn’t quite hold true in a real-world sense.

This makes me think that it may be useful to try to incorporate loudness as part of the aggregate timeness metric. For the most part these files will be queried and have their loudness compensated, so these kinds of differences would make less of a difference in context, but it may be useful to add a bit of that to this.

////////////////////////////////////////////////////////////////////////////////////////////////////////////

Would love any input on the idea or specific steps here.

_timeness.txt.zip (42.4 KB)


----------begin_max5_patcher----------
2718.3oc0b01aihqE9ys+JrhtqzN6lIWrMXfQiFo62t+G1tphj3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KmZQ
SKLV32ETcrwXgCG8XMCJIiZATpJQ9XXT4BnAFEecC9Ic6PLpcVQG2X8wX44D
j2VXJgN5A+p09IjwLVDpEFK13vzYwZNabhNr4XrIiyPj6rM1uOeSlkwdLq2L
a3CaT9pCYyhAP+wNzFrSPtN70YLxU1HNrQo8bxhfkv2QYzHHXNrCOJcG1r3V
cTlLXyh.MMXrbMouDU7Hp+6+gPOuFltAXYBsCRjDXXSrIdpZbbNsaCDvtFHv
aXZFA.Zn5r3NF.3Jy8YLAfPsQbVrQk7wrHmO4A9jkXJ1U9h7icfTu0WOBcW1
lq94ztR.y6Zm1Dl+MXZOlxePblESoiISLx4wRqp3yIuguhA4j2r2SdqdO+M5
s+2l2SeSdkuaC88F7d++b++C9WDue
-----------end_max5_patcher-----------
1 Like

this will need all my brains, so not an evening, but a proper three-pipe-problem. I wish I smoke the pipe just for that. Like @andrea.valle

1 Like

In thinking about this further, I’d probably be better off taking low(5) and high(95) centiles, and clamping the output, in case there happen to be outliers in the corpus in terms of timeness-nessy-ness.

I had a quick look up for the maths of this, and I too no longer have the brain juice to implement that in vanilla Max land, so I’ll revisit this idea tomorrow. (everything is so clean in list-land, that I wouldn’t want to go into a buffer~ just to fluid.bufstats~ it)

simple:
take you input list
sort it
take the (0.05length)nth and the (0.95length)nth elements
voila!

1 Like

Oh, that’s easy enough. I guess it doesn’t matter for larger corpora with a lot of, but is there a convention in terms of rounding up, or “in”, or “out” in terms of length.

Like if I have 10 entries and ask for the 95% percentile would that be the 9th or 10th entry (in the sorted list)? And same goes for the 5% percentile, would it be 1st or 2nd?

I can make a call for what I do here, but if there is a convention, I’d sooner go with that.

Here’s a version that does 5/95 centiles instead of min/max for the final scaling.

(I rounded the lower centile down, and rounded the upper centile up)


----------begin_max5_patcher----------
3183.3oc0cstiihiE92U8Tfh1QZ5oql02AZ0p0t+aeGlZTIRhSJ5k.Q.opZ5
Qy695KPBPLoLIljZiTmpwFv974yU6ic9q6ua17723ky79p2u6c2c+082cmpH
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i5B4QFyQSl
FAStnieGq.BTGbHbjvPXnSgAiSNFjAuHXXH2vkS8CbjjqiNxknP1fb+W3Q6x
fS8P8DJXHrq.jilgScDoFmQE8Dp37Edn+T20lpbzzciZFPLQUnKhpFP.UMYE
muetLyA+wNSYRTDzGezrxhISgN5KkxYtgxwX8tXaRn7calyKFgsZAgjrQezd
AMPxmuuLi83XJfc7Tjbgg8N.afZZRaV8vSeNT8vINOpviY0IHuu1ZSrCAgCb
pt8tq2OWvGz8..ZqnI2erRwb9QZ1trejmj8dGoYCAlnnYN4HxqQqBfdr5TLX
RzpH2SQoIK3myo4lqNL2pIaHC4CayCEd07yi1wQu8WhUWRGoeeGlpgNvBdrZ
ZYP8NYzD2.5B0zNjeexIsdbTK0Md8gngpYLyjhTbzjPqxoqebzpi7vEKGQGh
VwefMZ.ciMiF4cXjOr+BdcMsYnZgt64GMF2Oe4pQ5ixSNYxug22OGJE4PGxh
viFMsskh5jQdC0TnNoxeuLw6ra69u1ojN0s06RnvPmzVXqA0KusPV0VXWzV.
j0XHzIsEzp1BcosELzF5pcV6Nwxa3Najfd4s7Y21g1Pl85fNRT2plVsVJS.Y
aizH1EB9rHKZodPgi.XqZZ0JR3d.lwrkrctIDqZZ0pRMAjMwl1dJFroitg2j
rbqHNzpZ+QPr.UpqAkmCEsiLJhHiKPE4sg5tPwCrMJATLxng53TjNKwQ3imU
.RHT486IqDEBNtRDUGPzw045QN6f.1k.AzSWmQ..qycIq.fKSnAeortXH4Fv
5hhrk004B6plFZCKysooUqrq60thryfFZRZaahU.E4.OFrKBHW33YOeqNgye
FLRitrl1FzDLELvPqb1tKWdeSk0pTzqkVHSmRscthoWrJRjZk3TWcZNR87Cz
6WDAIMz6WBgd+JHb7u.BC+qeP+e4CTaLtg9EO39+99+G253kX
-----------end_max5_patcher-----------

I could start my own thread with this question, but I think it fits in the “PCA…what the?” category. I took a 49 dim spectral shapes stats analysis and used PCA to convert it to two dimensions and 6 dimensions. Why would the first two dimensions of the 6 dimensional plot be exactly the same as the 2 dimensional plot? Pix attached. 2 dim on the top. 6 dim on the bottom in 2 dim clumps.

Yes, I cleared the data before I replotted.

Screen Shot 2020-07-01 at 2.48.20 PM

I’m interested what happens when you reduce to 48. Are the same two dimensions the same? My naive hunch is that PCA does not change much as you go down because those first two dimensions are still captured in the reduction to both 6 and 2. PCA is linear, so maybe those magical orthogonal lines are going through the same points.

Yes. They look the same. I am normalizing, then PCA, then normalizing again.

I guess this is also because the dimensions of the PCA go in order of “differentness”?

Maybe I should be using MDS. Not sure. I want all the dimensions to be equally important. I think.

IIUC, that is exactly what PCA does! First component is the best approximation, second component is the approximation of the remainder, and so on and so forth…

The tl;dr is because that’s how PCA works: it ‘discovers’ new axes in the space and orders these by how much of the data’s variance each axis accounts for. All that happens when you ask FluidPCA for fewer dimensions is that you get a subset of its internal matrix.

It’s a cheap and cheerful try-this-first (or-as-well) method, rather than a full-blown dimensionality reduction approach. So, if you want equally important dims, yes, try MDS. Or try a gentler PCA to reduce redundancy followed by MDS.

2 Likes

After all the temporal/morphology talk in the AudioGuide thread I decided to revisit this thread and idea, and wanted to figure out the linear regression stuff anyways.

I shall save you the details of me trying to understand how to implement linear regression in Max, but mercifully one of @Angela’s friends is an MIT’d data scientist, and he held my dumbdumb hand through the process…

But here is a Max implementation of the slope output of linear regression (based on a translation of this javascript code):


----------begin_max5_patcher----------
10086.3oc68s1aikbcsetmeELB2Oknou06G4SW63DGfXmDD6KLtv3hFTRr0v
YnHEHo5oaGj7aOqUU6CEoDOjEkN5gM7X2pUedtqcser1ONU8e9ce3rKV70Iq
Naze+n+3nO7g+yu6CenbHdfOH+6Ob1Mi+5kyFupbYmM+tatXxxyNudpaGu9x
eX57q+zxIWtt9Xb93GUmOJo9nOoBZsSi+3C4v4i7JdFi4ipQ++kGvh6VOax5
0e61I069ryNezYWLd90ms4RldU4Eu3he76MV08u4kiuYx5IK+zj4iuXV41Ux
4.MNcNdrEJVe+AqurxQM7f+We22webdiC8KWbyMSlutiBVO4q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Jj7.wjrjqO3ss1s2s71YOMvCwMcSmS6C0UzdtcX
G8GAgpSUAFY7JYWdyvMEtzPNtVN4xIS+xgqb29jY1DXx8iI018W5vPb0PTnX
Qyd7Cb2fJKNBhRmBCo4r8fb6WGonUSle0p2adPtmIO75d6sMiUQYi+KacxVl
F2q2zCpry5w2drN4dqjQ8aFudwneCiB8rA68uZ8jOe2rYqOsBrvOZk59TUXC
Vcl5iG18oOrwFSdecaQi6Sj0cQOtSxXBCKSsNndgFSCX78lTLUA1X2n5X41M
8fZ8b8jUuu9dA9YlMmucpsAPYWXKVSamUlWfxsTkllx6PieuA6Nv4xA2Qxnn
NmUAY6qz3jZsGTp5lrbdmG7V5y+poKW+sQ+iWu3IoNW+z4JUviOyU2JSgk0G
uu6+569e.gJmv1
-----------end_max5_patcher-----------

Here is the relevant code:

function linearRegression(y,x){
        var lr = {};
        var n = y.length;
        var sum_x = 0;
        var sum_y = 0;
        var sum_xy = 0;
        var sum_xx = 0;
        var sum_yy = 0;

        for (var i = 0; i < y.length; i++) {

            sum_x += x[i];
            sum_y += y[i];
            sum_xy += (x[i]*y[i]);
            sum_xx += (x[i]*x[i]);
            sum_yy += (y[i]*y[i]);
        } 

        lr['slope'] = (n * sum_xy - sum_x * sum_y) / (n*sum_xx - sum_x * sum_x);
        lr['intercept'] = (sum_y - lr.slope * sum_x)/n;
        lr['r2'] = Math.pow((n*sum_xy - sum_x*sum_y)/Math.sqrt((n*sum_xx-sum_x*sum_x)*(n*sum_yy-sum_y*sum_y)),2);

        return lr;
}

I also included a vanilla Max version of the mean of the derivative of loudness, to compare the results, along with an option to omit the first frame (which would generally be an uptick).

The included coll dataset has hits from brushes.aif, jongly.aif, and some of my prepared snare stuff, so it’s a cross section of diff types of percussive/drum attacks, and across a fairly wide range of hits, the slope seems to more accurately capture the temporal shape.

When you have symmetrical samples, the results are pretty much the same:
Screenshot 2020-07-10 at 11.21.13 pm

But for things like this, the slope wins out in terms of giving you an idea of what the overall analysis window is doing:

Screenshot 2020-07-11 at 12.30.12 am

Screenshot 2020-07-11 at 12.30.29 am

edit:
original screenshots changed since I realized I wasn’t processing the same list of numbers for both.

Although I haven’t implemented it in my code above, there is also the r2 value, which can function in a similar way to the pitch confidence metric, so the higher the r2 value, the tighter the samples fit the slope.

So, I’m thinking of including this as another metric in the timeness descriptor, perhaps also incorporating the r2 as a weighting option for it, so the higher the r2, the more the slope is reflected in the overall timeness value.

I also imagine that you’re in crunch time leading up to the plenary, but wanted to check on your amountOfPipe-ness as to the overall concept here.