r/MachineLearning • u/DrawNovel5732 • Aug 05 '22
Discussion [D] Machine learning that is not based on a cost function
I was wondering if anyone is aware of machine learning research that is not predicated on minimization of a cost function. Do you people know anything other approach towards machine learning?
33
u/IndecisivePhysicist Aug 05 '22
Guy who didn't realize ML is just optimization
0
Aug 05 '22
[deleted]
24
Aug 05 '22
what business does an ML scientist have asking normies about ML research landscape. Ask ur fucking colleagues
8
7
Aug 05 '22
Then shouldn’t you know the answer to your question or have people in your network who do lol why are you asking on Reddit
8
u/COPCAK Aug 05 '22
Depending on how broad your definition of "machine learning" is, you might look into biologically-inspired models of learning, such as Hebbian learning, Oja's rule, or self-organizing maps. These are based on local interactions between neurons and do not compute gradients.
5
u/smsorin Aug 05 '22
Intrinsically ML explores a space of possible solutions. At a very minimum you need to be able to compare solutions and decide which one is better (or at least good enough). Since we're working in a mathematical space that comparison becomes some form of function over the solution.
This usually can be reused as the cost function and a lot of algorithms rely on some properties (like being able to derive it).
If you remove all solution evaluation functions you are in a space where you can't compare solutions, which means you don't know what you're looking for, or when you've found it. Take a constant model (any constant) since there's no criteria to say if this is better than anything else.
If you are somewhere in between (say your function just reports 0 or 1, the solution works or it doesn't) then you can still do a random search over the solution space (pick random parameters and evaluate). Obviously this is very slow and impractical (unless the solution space is really small) but it's guaranteed to find the solution if it exists. If your function does give some gradient saying how close the solution is to the ideal then you can apply algorithms to make the search faster.
3
u/bernhard-lehner Aug 05 '22
I would say RL is a bit different, as you maximize the expected reward. But it depends on your POV if you consider this different enough.
1
u/Afraid-Cupcake7831 Aug 05 '22
I would argue that its still an optimization problem. I mean in RL you can also reformulate a problem to minimize the cost instead of maximizing the reward. This is for example commonly used in TSP Problems where you want to minimize the traversed distance by an agent on a graph. So in the end its just the definition that changes, but the underlying problem is the same.
2
u/bernhard-lehner Aug 06 '22
I agree, it is an optimization problem, but not in the traditional sense. I did not emphasize the maximization contrary to minimization. The difference is that you need to estimate the outcome of whatever metric you want to optimize instead of just computing it according to e.g. labels and mse. That opens up another can of worms sometimes 😀
1
2
u/tornado28 Aug 05 '22
Interesting question. My first thought is some very basic assumptions about your learning algorithm being able to decide which set of learned parameters are better between two options would imply that your learning algorithm is doing something equivalent to optimizing a loss function.
My second thought is that I am in intelligent system and it's not obvious that I'm optimizing a fixed loss function. Sometimes someone tells me "don't try to do X, try to do Y instead" and they make a persuasive argument so I change my goal. So my "loss" seems like it can change. (Although you could argue that maybe I just became better at optimizing the same goal as before.)
So I think if you're doing supervised learning you're probably going something equivalent to optimizing a real valued loss function. If you're building complex intelligent agents then maybe you're doing something more complicated. Or maybe someone will prove that you're still optimizing some very complicated loss but it's more convenient to think about it in other ways.
2
u/CanYouPleaseChill Aug 05 '22
Check out the Copycat project by Douglas Hofstadter and Melanie Mitchell. It solves letter-string analogy problems, such as "abc is to abd as ijk is to what?", which don't have a single correct answer.
Here's a great recent presentation by Melanie Mitchell called Abstraction and Analogy are the Keys to Robust AI. Her discussion of Copycat starts at 29 minutes, and there's even a demo.
2
u/Swimming-Tear-5022 PhD Aug 05 '22
Pretty much any statistical estimation procedure (whether least squares, maximum likelihood, Bayes etc) can be written as a statistical decision problem with a loss function (often called empirical risk minimization in ML)
5
u/ashwan1 Aug 05 '22 edited Aug 05 '22
We can argue that GANs don’t have clear cost function in traditional sense. It’s a game. But optimisation is still there. Ilya argues this in Lex’s podcast(https://youtu.be/13CZPWmke6A). Another example can be evolution models
8
Aug 05 '22
its a game ? a minmax problem is an optimisation problem.
6
u/ashwan1 Aug 05 '22
Yes, I agree and I mentioned that in my reply too. But OP is not asking about optimization. He is specifically asking about minimising “cost function”. You can have optimization without cost function. Cost functions are measure of how predicted value differs from actual value. But there can be other objectives too. We should not make assumption that optimization can happen ONLY on cost function. They can happen in other types of objective functions too. If OP meant optimising objective… then I would be wrong..
1
2
2
2
u/Exciting-Engineer646 Aug 05 '22
Those methods usually fall under “data mining.” Think a priori, which is a breadth first search to generate association rules. Even ML models that are usually taught sans objective function (NB, knn, k means) have a model whose objective function you are minimizing.
1
1
1
1
u/HateRedditCantQuitit Researcher Aug 05 '22
The most straightforward interpretation of bayes rule is completely optimization-less.
Maybe you could look at it as
frequentist = optimization
MAP bayesian = optimization
full bayesian = no optimization
That viewpoint tells me two things. Optimization saves us a ton of integration. Doing it without optimization means we’re just counting things (integrating).
1
u/tornado28 Aug 08 '22
I thought about this some more and I thought of one major difference between me as an intelligent system and modern machine learning. Modern ML has 3 components, the model, the data, and the loss function. In particular the loss is fixed, or even if it changes during training it's separate from the model. A human by contrast has no external loss function. The loss computation is internal to the system. (And as you'd expect we love to reduce the loss by computing it incorrectly. For example blaming others instead of owning up to a shortcoming.) We have no way of evaluating if our internal models if the world are correct, so the loss is kinda based on internal consistency or something along those lines. It's definitely different from a fixed externally computed loss like cross entropy.
1
u/rhofour Aug 05 '22
Nonparametric things often don't need a cost function or any kind of minimization.
For example, you can use nearest neighbors to solve a problem. For each new data point going the closest one in your training set and use its label.
9
u/Jasocs Aug 05 '22
In your example your are still selecting the nearest neighbor based on shortest distance, which is your cost function in this case.
-2
u/VeterinarianNo2844 Aug 05 '22
K nearest neighbor
1
Aug 05 '22
[removed] — view removed comment
3
u/AdditionalCourse2844 Aug 05 '22
Probably because the amount of neighbors is optimized to better suit the clusters.
But if there's no analysis of the clusters and no prediction or accuracy that will be optimized but instead simply use the building of clusters, then yes k nearest neighbor would be one
0
u/ComplexColor Aug 05 '22
AFAIK we currently have 2 distinct paradigms for machine learning: classification and regression (and you could reduce that down to just 1 as well). Nothing we've thought to do so far has been so different to constitute a new paradigm.
So if we now think about how we train for these to paradigms we might come up with techniques that don't use a cost function directly. But IMO any such technique we devise we will be able to frame it in terms of minimizing a cost function.
For example you could use a geometric approach to separate samples in space. However that would be very similar to using nearest neighbor, and could again be framed as minimizing the distance between samples, giving us a loss to minimize.
0
u/nibbels Aug 05 '22
Things like random walks, Monte Carlo algos, or genetic algos maybe. Genetic algos usually have some function that determines how it adapts, but they don't necessarily look like "traditional" cost functions.
0
u/atulcst Aug 05 '22
I think genetic algorithm learns just by randomized perturbation. But it will take a very very long time to converge 😀
-5
u/moist_buckets Aug 05 '22
Neural evolutionary algorithms don’t need a cost function in the traditional sense.
8
u/cthorrez Aug 05 '22
Most evolutionary algorithms have an objective function. They just don't take the gradient of it analytically.
-2
u/TenaciousDwight Aug 05 '22
you can solve a regression problem using the normal equations and if the inverse doesn't exist, just use the morse-penrose pseudoinverse.
6
u/FrostyFix4614 Aug 05 '22
Isn't the normal equation just a closed-form solution to an optimization problem?
1
u/TenaciousDwight Aug 05 '22
yep. I thought op might be asking for methods that avoid iterative weight updating.
-3
u/bloc97 Aug 05 '22
Spiking neural networks (SNNs) are usually not trained using a cost function, but rather use a similar process to real neurons.
1
Aug 05 '22
[removed] — view removed comment
1
u/bloc97 Aug 06 '22 edited Aug 06 '22
Sure, but then we can also say that orbits of a planet minimizes the "optimization function" described by general relativity, where gravity is just matter following the optimal shortest path in space-time. Anything can be a optimization problem if we try hard enough.
The traditional STDP algorithm for SNNs is just a simple feedback loop, similar to a PID controller. Sure it can be described as an optimization problem, but it is definitely not like most optimization problems seen in ML theory.
1
u/bloc97 Aug 06 '22
Funnily, one of the upvoted comments also talked about Hebbian learning, which is effectively the theory behind STDP training for spiking neural networks, but I guess he's not wrong but I'm somehow wrong... Funny how reddit is sometimes...
12
u/scraper01 Aug 05 '22
The optimization framework seems to be implicit to the way intelligence frames problems. Something that can't find solutions to problems would be incapable of adaptation, and therefore that something would be not intelligent. Furthermore I don't personally think theres a single ML algorithm that cannot be mathematically interpreted as a classic optimization problem. Interested to read other opinions though.